From 9825a69ac74eb8c862258a155f839457c326c3b4 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 8 Jan 2016 15:39:04 -0500 Subject: [PATCH] dockerfile: change entrypoint to allow args --- Dockerfile | 6 +++--- README.md | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30fc4b5..1316d62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,8 @@ RUN go install github.com/chihaya/chihaya/cmd/chihaya # Configuration/environment VOLUME ["/config"] -ENV CHIHAYA_LOG_LEVEL 5 EXPOSE 6880-6882 -# docker run -p 6880-6882:6880-6882 -v $PATH_TO_DIR_WITH_CONF_FILE:/config:ro -e CHIHAYA_LOG_LEVEL=5 quay.io/jzelinskie/chihaya:latest -CMD ["sh", "-c", "chihaya", "-config=/config/config.json", "-logtostderr=true", "-v=$CHIHAYA_LOG_LEVEL"] +# docker run -p 6880-6882:6880-6882 -v $PATH_TO_DIR_WITH_CONF_FILE:/config:ro -e quay.io/jzelinskie/chihaya:latest -v=5 +ENTRYPOINT ["chihaya", "-config=/config/config.json", "-logtostderr=true"] +CMD ["-v=5"] diff --git a/README.md b/README.md index 7ec1dae..f1dffbd 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,8 @@ An explanation of the available keys can be found in [CONFIGURATION.md]. ```sh $ docker pull quay.io/jzelinskie/chihaya:latest -$ docker run -p 6880-6882:6880-6882 -v $PATH_TO_DIR_WITH_CONF_FILE:/config:ro -e CHIHAYA_LOG_LEVEL=5 quay.io/jzelinskie/chihaya:latest +$ export CHIHAYA_LOG_LEVEL=5 # most verbose, and the default +$ docker run -p 6880-6882:6880-6882 -v $PATH_TO_DIR_WITH_CONF_FILE:/config:ro -e quay.io/jzelinskie/chihaya:latest -v=$CHIHAYA_LOG_LEVEL ``` ## Developing Chihaya