diff --git a/priv/templates/phx.gen.release/Dockerfile.eex b/priv/templates/phx.gen.release/Dockerfile.eex index 40a88eedbc..49e8d82b5b 100644 --- a/priv/templates/phx.gen.release/Dockerfile.eex +++ b/priv/templates/phx.gen.release/Dockerfile.eex @@ -1,16 +1,22 @@ -# Find eligible builder and runner images on Docker Hub. We use Ubuntu/Debian -# instead of Alpine to avoid DNS resolution issues in production. +# This file is based on these images: # -# https://hub.docker.com/r/hexpm/elixir/tags?name=ubuntu -# https://hub.docker.com/_/ubuntu/tags +# - https://hub.docker.com/r/hexpm/elixir/tags - for the builder image +# E.g.: docker.io/hexpm/elixir:<%= elixir_vsn %>-erlang-<%= otp_vsn %>-debian-<%= debian %>-<%= debian_vsn %>-slim +# - https://hub.docker.com/_/debian/tags?name=<%= debian %>-<%= debian_vsn %>-slim - for the runner image +# E.g.: docker.io/debian:<%= debian %>-<%= debian_vsn %>-slim # -# This file is based on these images: +# Find builder and runner images on Docker Hub or on Hex's Build Server (Bob). +# We recommend using Bob's Web UI to find recent tags: +# +# - https://bob.hex.pm/docker # -# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image -# - https://hub.docker.com/_/debian/tags?name=<%= debian %>-<%= debian_vsn %>-slim - for the release image -# - https://pkgs.org/ - resource for finding needed packages -# - Ex: docker.io/hexpm/elixir:<%= elixir_vsn %>-erlang-<%= otp_vsn %>-debian-<%= debian %>-<%= debian_vsn %>-slim +# We suggest using the same Debian version for both the builder and runner images. # +# We suggest Debian/Ubuntu instead of Alpine to avoid production compatibility issues +# (such as DNS resolution failures, and dynamically linked NIFs/precompiled binaries). +# +# For finding packages in Debian, search on https://packages.debian.org/. + ARG ELIXIR_VERSION=<%= elixir_vsn %> ARG OTP_VERSION=<%= otp_vsn %> ARG DEBIAN_VERSION=<%= debian %>-<%= debian_vsn %>-slim