nickjj / docker-rails-example

A production ready example Rails app that's using Docker and Docker Compose.
MIT License
941 stars 185 forks source link

permission issue #56

Closed arvindcj closed 1 year ago

arvindcj commented 1 year ago

ERROR

hellorails-web-1 | /usr/local/bundle/gems/rack-2.2.5/lib/rack/server.rb:433:in `initialize': Permission denied @ rb_sysopen - /app/tmp/pids/server.pid (Errno::EACCES)

I am almost sure that this is a local issue with my development environment.

I followed the steps in the README file and made sure that my UID and GUID are 1000.

➜ hellorails git:(main) ✗ id uid=1000(arvindcj) gid=1000(arvindcj)

➜ hellorails git:(main) ✗ cat .env |grep 1000 If you're running native Linux and your uid:gid isn't 1000:1000 you can set export UID=1000 export GID=1000

The ran> docker compose up --build

To get the error on the first line and the docker container does not start.

However, when am able to start the container from the image: doceker run -it

I see that the container starts: docker run -it 61b8bc6d195e => Booting Puma => Rails 7.0.4 application starting in development => Run bin/rails server --help for more startup options Puma starting in single mode...

But unable to reach port 8000 from the base machine.

nickjj commented 1 year ago

Hi,

Are some of the files on your local dev box owned by something other than arvindcj, maybe root from previous things?

nickjj commented 1 year ago

Going to close this one as there's no response and it sounds like a localized case to their file system's permissions.