Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to initialize build cache at /.cache/go-build: mkdir /.cache: permission denied #41

Open
liskicious opened this issue Nov 2, 2019 · 0 comments

Comments

@liskicious
Copy link

I tried to follow docs, but I get an error with the .cache folder. It seems to use /.cache and not ./.cache ?

➜  server mkdir -p ./.cache/pkg;

➜  server docker run -it \
  -u $(id -u) \           
  -v "$(pwd):/go/src/app" \
  -v "$(pwd)/.cache/pkg:/go/pkg" \
  -w /go/src/app \
  zephinzer/godev:latest \
  godev init
/go/src/app 
Nov02/16:46| [main] godev has started
odev> initialise git repository at '/go/src/app'? [y/N]: y
odev> sure thing
Initialized empty Git repository in /go/src/app/.git/
odev> seed a .gitignore? [y/N]: y
odev> sure thing
odev> seed a go.mod? [y/N]: y
odev> sure thing
odev> seed a main.go? [y/N]: y
odev> sure thing
odev> seed a Dockerfile? [y/N]: y
odev> sure thing
odev> seed a .dockerignore? [y/N]: y
odev> sure thing
odev> seed a Makefile? [y/N]: y
odev> sure thing
Nov02/16:46| [main] godev has ended
➜  server git:(master) ✗ docker run -it \
  -u $(id -u) \
  -v "$(pwd):/go/src/app" \
  -v "$(pwd)/.cache/pkg:/go/pkg" \
  -w /go/src/app \
  zephinzer/godev:latest \
  godev     
Nov02/16:46| [main] godev has started
Nov02/16:46| [main] working dir : '/go/src/app'
Nov02/16:46| [main] watching dir: '/go/src/app'
Nov02/16:46| [command/go] 'mod', 'vendor'
► ─────────────────────────────────────────── pid:12 id:20bcdb ►
go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'
Nov02/16:46| [command/go] 
■ ─────────────────────────────────────────── pid:12 id:20bcdb ■
Nov02/16:46| [run/1/1/3]] command[20bcdb] exited with: exit status 1
Nov02/16:46| [command/go] 'build', '-o', '/go/src/app/bin/app'
► ─────────────────────────────────────────── pid:21 id:c6be74 ►
failed to initialize build cache at /.cache/go-build: mkdir /.cache: permission denied
Nov02/16:46| [command/go] 
■ ─────────────────────────────────────────── pid:21 id:c6be74 ■
Nov02/16:46| [run/1/2/3]] command[c6be74] exited with: exit status 1
Nov02/16:46| [run/1/3/3]] application at '/go/src/app/bin/app' could not be found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant