diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 570e970..1166994 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -38,6 +38,10 @@ jobs: - name: Run playground run: go run main.go cook ${{ matrix.flags }} --output /tmp/playground --timeout 4m --watchdog + # Make sure there are no permission issues on the playground directory + - name: Remove playground directory + run: rm -rf /tmp/playground + - name: Copy playground logs if: ${{ failure() }} run: ./scripts/ci-copy-playground-logs.sh /tmp/playground /tmp/playground-logs diff --git a/internal/local_runner.go b/internal/local_runner.go index 1a0ac79..effe7d9 100644 --- a/internal/local_runner.go +++ b/internal/local_runner.go @@ -643,6 +643,12 @@ func (d *LocalRunner) toDockerComposeService(s *Service) (map[string]interface{} "labels": labels, } + if runtime.GOOS == "linux" { + uid := os.Getuid() + gid := os.Getgid() + service["user"] = fmt.Sprintf("%d:%d", uid, gid) + } + if len(envs) > 0 { service["environment"] = envs }