Odd, as the Dockerfiles we now produce don’t have that line. We are now basing our Rails dockerfiles of of the ones that will be provided by Rails 7.1. We are also contributing to that effort, and bringing it to applications of all Rails releases. By teaming up, we are producing Dockerfiles with better documentation, testing, and support. Come join us!
To get started, if you haven’t already done so, make sure your source is saved.
git add .
git commit -a -m snapshot
Next, regenerate your Dockerfile:
bundle add dockerfile-rails --optimistic --group development
bin/rails generate dockerfile
It will prompt you when it needs to overwrite a file. Accept those changes.
Review this FAQ: Dockerfiles and fly.toml · Fly Docs ; in particular look at the scaling section, and either run the command again with
--no-prepare or remove/comment out the deploy section in your
Now you should be ready to deploy.
If you are still having problems, it probably means that something you have in your package.json won’t build. Providing your package.json might help me spot the problem. In rare cases the problem is in your yarn.lock file (or package-lock.json). Deleting that and rebuilding can often fix such problems.
If you don’t like what you see, you can undo these changes by running
git checkout .
Reasonable guess, but no you don’t want to upload your
node_modules to the build machine. For starters, this directory is often huge. And depending on your configuration it was built for Microsoft Windows, an M1 Mac, or other configuration when we need is one that works on i686 Debian Linux, so we rebuild your node_modules directory on such a machine.