       ])
     end
 
-    if docker? do
+    if opts.docker do
       Mix.Phoenix.copy_from(paths(), "priv/templates/phx.gen.release", binding, [
         {:eex, "Dockerfile.eex", "Dockerfile"},
         {:eex, "dockerignore.eex", ".dockerignore"}

        _build/dev/rel/#{app}/bin/#{app}
    """)

    if ecto? do
      post_install_instructions("config/runtime.exs", ~r/ECTO_IPV6/, """
      [warn] Conditional IPV6 support missing from runtime configuration.



  Note, the `rel/overlays` directory is copied into the release build by default when
  running `mix release`.

  To skip generating the migration-related files, use the `--no-ecto` flag. To
  force these migration-related files to be generated, the use `--ecto` flag.

  ## Docker

  When the `--docker` flag is passed, the following docker files are generated:

