jpetazzo / container.training

Slides and code samples for training, tutorials, and workshops about Docker, containers, and Kubernetes.

Home Page:http://container.training/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permission error when running `gem install sinatra`

npty opened this issue · comments

commented

Reproduce steps:

  1. Clone the repo git clone git@github.com:jpetazzo/container.training.git (commit 2e4e6bc as of now)
  2. Go inside dockercoin folder cd dockercoins
  3. 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! 👍