Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More customization of runtime image #30

Open
alizain opened this issue Nov 25, 2019 · 1 comment
Open

More customization of runtime image #30

alizain opened this issue Nov 25, 2019 · 1 comment

Comments

@alizain
Copy link

alizain commented Nov 25, 2019

I'd like to be able to customize the runtime image further. Would you be interested in accepting a PR that modifies the Dockerfile-release.eex file like so (with appropriate changes to the generator app)?

################################################################################
## 2. Application runtime image
## From the OS base image, installs the release built above, and sets the
## entrypoint. This is the final image executed by Google App Engine.

FROM <%= @os_image %>

+  ## If your application needs additional steps when constructing the runtime image,
+  ## use the `runtime_image_directives` option to specify them
+  <%= for directive <- @runtime_image_directives do %>
+  <%= directive %>
+  <% end %>
-  ...

## Copy built release from build stage into /app
COPY --from=app-build /app/_build/<%= @mix_env %>/rel/<%= @release_app %> /app/

## Command to start the release.
CMD <%= @entrypoint %>
@dazuma
Copy link
Member

dazuma commented Dec 14, 2019

This seems risky. It's very powerful, and there's a lot of opportunity for mistakes to be made. Additionally, it opens the door for future incompatibilities; if an app has inserted custom directives that conflict with future changes made to the normal Dockerfile template.

If you really need to customize the Dockerfile this closely, I would recommend simply writing your own Dockerfile, and using runtime: custom. (See documentation.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants