This is my first time using devcontainers and I rarely use Visual Studio Code, so I might be doing something wrong. Feel free to close this PR.
Problem
When I tried to open this repo in a dev container in Visual Studio Code, I got lots of permission errors.
For example, if I try to build the current Go package or Go workspace:
Starting‘ building the current workspace at /workspaces/python-starlark-go
/workspaces/python-starlark-go>Finished running tool: /opt/go/bin/go build
go: could not create module cache: mkdir /home/builder/go/pkg: permission denied
go: could not create module cache: mkdir /home/builder/go/pkg: permission denied
Starting building the current package at /workspaces/python-starlark-go
/workspaces/python-starlark-go>Finished running tool: /opt/go/bin/go build -o /tmp/vscode-gosVaJUu/go-code-check .
go: could not create module cache: mkdir /home/builder/go/pkg: permission denied
go: could not create module cache: mkdir /home/builder/go/pkg: permission denied
go: could not create module cache: mkdir /home/builder/go/pkg: permission denied
I also get errors to do with shellcheck and mcfly whenever I run any command in the terminal.
Solution
I made these changes to the Dockerfile by trial and error. It seems to work for me now, e.g.:
Starting building the current package at /workspaces/python-starlark-go
/workspaces/python-starlark-go>Finished running tool: /opt/go/bin/go build -o /tmp/vscode-goL28DLO/go-code-check .
This is my first time using devcontainers and I rarely use Visual Studio Code, so I might be doing something wrong. Feel free to close this PR.
Problem
When I tried to open this repo in a dev container in Visual Studio Code, I got lots of permission errors.
For example, if I try to build the current Go package or Go workspace:
I also get errors to do with
shellcheck
andmcfly
whenever I run any command in the terminal.Solution
I made these changes to the Dockerfile by trial and error. It seems to work for me now, e.g.: