lbry-docker/chainquery/Dockerfile-linux-x86_64-production

28 lines
1.1 KiB
Text
Raw Normal View History

## Get the latest source and extract it for the app container.
## Design choices, two RUN layers intended to keep builds faster, the zipped
2018-10-16 09:28:03 +02:00
FROM ubuntu:18.04 as prep
LABEL MAINTAINER="leopere [at] nixc [dot] us"
RUN apt-get update && \
apt-get -y install unzip curl && \
apt-get autoclean -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY ./stuff/start.sh start
2019-04-28 23:26:58 +02:00
COPY ./stuff/healthcheck.sh healthcheck
RUN curl -L -o /chainquery.zip $(curl -s https://api.github.com/repos/lbryio/chainquery/releases | grep -F 'Linux_x86_64.zip' | grep download | head -n 1 | cut -d'"' -f4) && \
unzip /chainquery.zip && \
rm /chainquery.zip
2018-10-16 09:28:03 +02:00
FROM ubuntu:18.04 as app
ADD https://raw.githubusercontent.com/lbryio/chainquery/master/config/default/chainqueryconfig.toml /etc/lbry/chainqueryconfig.toml.orig
RUN adduser chainquery --gecos GECOS --shell /bin/bash --disabled-password --home /home/chainquery && \
chown -R chainquery:chainquery /etc/lbry
2019-04-28 23:26:58 +02:00
COPY --from=prep ./healthcheck /chainquery /start /usr/bin/
HEALTHCHECK --interval=1m --timeout=30s \
CMD healthcheck
2018-10-16 09:28:03 +02:00
EXPOSE 6300
USER chainquery
STOPSIGNAL SIGINT
CMD ["start"]