Closed mitsuru-komaita closed 3 years ago
Change the execution user in the docker container from root to a regular user and run cloud build
Dockerfile USER app
USER app
bundle exec rake appengine:exec -- bundle exec rake db:migrate. If you run Permission denied.
bundle exec rake appengine:exec -- bundle exec rake db:migrate
cloudbuild.yaml
- name: gcr.io/$PROJECT_ID/${_GAE_SERVICE}:${_COMMIT_SHA} entrypoint: '/bin/bash' args: - '-c' - | bundle exec rake appengine:exec -- bundle exec rails db:migrate id: migrate
Step #1 - "migrate": `/builder/home` is not writable. Step #1 - "migrate": Bundler will use `/app/tmp/bundler20210208-1-x6dat21' as your home directory temporarily. Step #1 - "migrate": rake aborted! Step #1 - "migrate": Errno::EACCES: Permission denied @ dir_s_mkdir - /workspace/tmp/cache
When I run it manually, I can run it without any problem.
Is there any workaround for this?
Change the execution user in the docker container from root to a regular user and run cloud build
Dockerfile
USER app
bundle exec rake appengine:exec -- bundle exec rake db:migrate
. If you run Permission denied.cloudbuild.yaml
When I run it manually, I can run it without any problem.
Is there any workaround for this?