I am new to Elixir so I might have missed something, but Build, Deploy and Run an Elixir Application appears to be out of date with the newer versions of Elixir and Phoenix. From the Phoenix 1.6 blog post:
In addition to the new HTML engine, we’ve also had a major change on the way the
phx.newproject generators handles assets. We have dropped webpack and node entirely from the equation. You can now build your js and css bundles without having node or npm on your system!
The Dockerfile tries to copy the Node assets which fails if you ran
mix phx.new hello_elixir with Phoenix 1.6.
That is my best guess at why it is failing at least…here is the error:
Error error building: error rendering build status stream: COPY failed: file not found in build context or excluded by .dockerignore: stat assets/package.json: file does not exist
I deleted the .dockerignore file just in case that was the culprit, especially because I am using --remote-only (M1 Macs are awesome until it is Docker build time…).
Deleting anything relating to Node/npm in the Dockerfile results in a successful build.