You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Replace Ruby version below with your application's Ruby version. Delete this comment.FROMruby:2.7.1RUNapt-getupdate -qq && apt-getinstall -ynodejspostgresql-clientRUNmkdir/my_appWORKDIR /my_appCOPYGemfile/my_app/GemfileCOPYGemfile.lock/my_app/Gemfile.lockRUNbundleinstallCOPY. /my_app# Add a script to be executed every time the container starts.COPYentrypoint.sh/usr/bin/
RUNchmod +x /usr/bin/entrypoint.shENTRYPOINT["entrypoint.sh"]EXPOSE3000# Start the main process.CMD["rails","server","-b","0.0.0.0"]
docker-compose.yml :: Add to my_app root directory
#!/bin/bashset -e
# Remove a potentially pre-existing server.pid for Rails.
rm -f /my_app/tmp/pids/server.pid
# Then exec the container's main process (what's set as CMD in the Dockerfile).exec"$@"
Hi @iEvolv3
great guide, just had a question as to why are we copying the gemfile and gemfile.lock separately and then copying the entire application directory? and same goes for `entry point file.
Why don't we just copy the app directory that contains all these files?
Hi @iEvolv3
great guide, just had a question as to why are we copying the
gemfile
andgemfile.lock
separately and then copying the entire application directory? and same goes for `entry point file.Why don't we just copy the app directory that contains all these files?