Permission error when running `gem install sinatra`
npty opened this issue · comments
Reproduce steps:
- Clone the repo
git clone git@github.com:jpetazzo/container.training.git
(commit 2e4e6bc as of now) - Go inside dockercoin folder
cd dockercoins
- Run
docker-compose up
Run into the following issue
docker-compose up
Building hasher
Step 1/7 : FROM ruby:alpine
---> 9d6c19e9b063
Step 2/7 : RUN apk add --update build-base curl
---> Using cache
---> cb670ccae9bb
Step 3/7 : RUN gem install sinatra
---> Running in c6deff28dcf2
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/bundle directory.
ERROR: Service 'hasher' failed to build: The command '/bin/sh -c gem install sinatra' returned a non-zero code: 1
Interesting! Thank you for reporting the issue, and for following up with the fix. This can definitely be useful for others! 👍