2019-04-18 19:48:46 +02:00
|
|
|
## 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 && \
|
2019-10-10 03:42:26 +02:00
|
|
|
apt-get -y install unzip curl busybox-static && \
|
2019-04-18 19:48:46 +02:00
|
|
|
apt-get autoclean -y && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
2019-04-26 02:41:42 +02:00
|
|
|
COPY ./stuff/start.sh start
|
2019-04-28 23:26:58 +02:00
|
|
|
COPY ./stuff/healthcheck.sh healthcheck
|
2019-10-10 15:29:01 +02:00
|
|
|
RUN curl --progress-bar -L -o /chainquery https://build.lbry.io/chainquery/branch-master/chainquery && \
|
|
|
|
chmod +x /chainquery /start /healthcheck
|
2018-10-16 09:28:03 +02:00
|
|
|
|
|
|
|
FROM ubuntu:18.04 as app
|
2019-04-18 19:48:46 +02:00
|
|
|
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-10-10 03:42:26 +02:00
|
|
|
COPY --from=prep ./healthcheck /chainquery /start /bin/busybox /usr/bin/
|
2019-04-28 23:26:58 +02:00
|
|
|
HEALTHCHECK --interval=1m --timeout=30s \
|
|
|
|
CMD healthcheck
|
2018-10-16 09:28:03 +02:00
|
|
|
EXPOSE 6300
|
2019-04-18 19:48:46 +02:00
|
|
|
USER chainquery
|
2019-04-28 23:24:56 +02:00
|
|
|
STOPSIGNAL SIGINT
|
2018-10-03 20:12:23 +02:00
|
|
|
CMD ["start"]
|