DEV Community

Discussion on: Dockerize a Rails 5, Postgres, Redis, Sidekiq and Action Cable Application with Docker Compose

Collapse
 
msoedov profile image
Alex Miasoiedov • Edited
> RUN mkdir /app
>  WORKDIR /app

Just WORKDIR /app, since 2015 WORKDIR directive creates a dir if it does not exist

CMD puma -C config/puma.rb

CMD uses execvpe sys-call so it's better to pass arguments as a list

CMD ["puma",  "-C", "config/puma.rb"]

Collapse
 
nickjj profile image
Nick Janetakis

Thanks. I meant to change that so long ago (removing mkdir). Old habits die hard!

In the next orats release I'll update the Dockerfile and this post to reflect both changes.