bazel-remote
bazel-remote copied to clipboard
Set default configuration in Dockerfile using environment variables
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.
LGTM, or we could change ENTRYPOINT to CMD IIRC.
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 runthen they will override the default specified inCMD.
Specifying these values as environment variables seemed better to avoid breaking changes.