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

Set default configuration in Dockerfile using environment variables #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlexandreCarlton
Copy link
Contributor

This will allow users to easily change the port and directory without having to override the entrypoint.

I also updated the README to document the usage of these environment variables.

This will allow users to easily change the port and directory without
having to override the entrypoint in a child image.
@nicolov
Copy link
Collaborator

nicolov commented Jul 17, 2018

LGTM, or we could change ENTRYPOINT to CMD IIRC.

@AlexandreCarlton
Copy link
Contributor Author

I considered this, but if we had:

CMD ["--port=80", "--dir=/data"]

then a user already providing arguments to the docker run invocation (for example --max-size 1) would override these options instead of appending to them. From the docs:

If the user specifies arguments to docker run then they will override the default specified in CMD.

Specifying these values as environment variables seemed better to avoid breaking changes.

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

Successfully merging this pull request may close these issues.

2 participants