thangchung / go-coffeeshop

☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment
MIT License
4.09k stars 411 forks source link

Permission denied for cache folder #10

Closed deulizealand closed 1 year ago

deulizealand commented 1 year ago

Hi, i got an error when using dev container to open the project.

did i missing step or something ?

image

deulizealand commented 1 year ago

what i do :

thangchung commented 1 year ago

I think the main reason is at https://github.com/thangchung/go-coffeeshop/blob/main/.devcontainer/devcontainer.json#L14 It runs as vscode user, but the code actually needs root to resolve pkg.

At the moment, we can sudo su into root user, then run go mod tidy, then it works normally.

I will fix this issue soon. Thanks for the finding

deulizealand commented 1 year ago

Thanks for the Feedback.

thangchung commented 1 year ago

Fixed in the latest version in the main branch at https://github.com/thangchung/go-coffeeshop/commit/22d33190a0cf81630878e47bafae2de7c0abb783. Feel free to re-open it if there are still things else to fix.