Run start as root and chainquery as not

Removed default config
This commit is contained in:
Leopere 2018-11-11 21:30:45 -05:00 committed by Mark Beamer Jr
parent 97b29f354c
commit d9aa1d93a5
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973
2 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ RUN adduser chainquery --gecos GECOS --shell /bin/bash --disabled-password --hom
COPY --from=0 /download/chainquery /usr/bin COPY --from=0 /download/chainquery /usr/bin
# ADD --chown=1000:1000 https://github.com/lbryio/chainquery/releases/download/latest/chainquery_latest_Linux_x86_64.zip /usr/bin # ADD --chown=1000:1000 https://github.com/lbryio/chainquery/releases/download/latest/chainquery_latest_Linux_x86_64.zip /usr/bin
COPY stuff/chainqueryconfig.toml /etc/chainquery/ # COPY stuff/chainqueryconfig.toml /etc/chainquery/
## Get latest chainqueryconfig.toml from master on github as template. ## Get latest chainqueryconfig.toml from master on github as template.
# TODO: add magic which pattern matches for chainqueryconfig.toml DEFAULT strings and replaces them with configured settings on container start. # TODO: add magic which pattern matches for chainqueryconfig.toml DEFAULT strings and replaces them with configured settings on container start.
@ -42,8 +42,8 @@ COPY stuff/start.sh /usr/local/bin/start
# TODO: Implement docker-entrypoint if later required this might be handy if we need certain maintainence tasks to be executed in the live container. # TODO: Implement docker-entrypoint if later required this might be handy if we need certain maintainence tasks to be executed in the live container.
# COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint # COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
## From here onward we're doing this with no root. # ## From here onward we're doing this with no root.
USER chainquery # USER chainquery
## Expose Chainquery API port ## Expose Chainquery API port
EXPOSE 6300 EXPOSE 6300

View file

@ -46,4 +46,4 @@ else
fi fi
## For now keeping this simple. Potentially eventually add all command args as envvars for the Dockerfile or use safe way to add args via docker-compose.yml ## For now keeping this simple. Potentially eventually add all command args as envvars for the Dockerfile or use safe way to add args via docker-compose.yml
chainquery serve -c "/etc/chainquery/" su -c "chainquery serve -c "/etc/chainquery/"" chainquery