diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2016-05-12 18:44:41 +0200 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2016-05-12 18:44:41 +0200 |
| commit | 05565014daa6cdc67fe035504011334f98bb89ad (patch) | |
| tree | c2fd362ca2b534b244aba423e361481f99aa0fed | |
| parent | a26f1b3cd749d336963967481b70e50659ec61e7 (diff) | |
Initialize admin password from default or env
| -rw-r--r-- | docker/Dockerfile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 314289339..be0b9c474 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,6 +12,9 @@ RUN apt-get update && apt-get install -yq \ # set current working dir WORKDIR /opt +# initial admin password can be set through environment variable +ENV YACY_ADMIN_PASS docker + # clone main YaCy git repository (we need to clone git repository to generate correct version when building from source) RUN git clone https://github.com/yacy/yacy_search_server.git @@ -24,6 +27,9 @@ WORKDIR /opt/yacy_search_server # Compile with ant RUN ant compile +# Set admin password from env variable in yacy.init file +RUN sed -i "/adminAccount=/c\adminAccount=admin:$YACY_ADMIN_PASS" /opt/yacy_search_server/defaults/yacy.init + # make some cleaning to reduce image size RUN rm -rf .git && apt-get clean |
