Add busybox-static to /usr/local/bin

This commit is contained in:
Dan Garthwaite 2019-10-09 21:42:26 -04:00 committed by Leopere
parent e6eb37aefa
commit ec3e9457b3

View file

@ -3,14 +3,16 @@
FROM ubuntu:18.04 as prep FROM ubuntu:18.04 as prep
LABEL MAINTAINER="leopere [at] nixc [dot] us" LABEL MAINTAINER="leopere [at] nixc [dot] us"
RUN apt-get update && \ RUN apt-get update && \
apt-get -y install unzip curl && \ apt-get -y install unzip curl busybox-static && \
apt-get autoclean -y && \ apt-get autoclean -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR / WORKDIR /
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY ./stuff/start.sh start COPY ./stuff/start.sh start
COPY ./stuff/healthcheck.sh healthcheck 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) && \ RUN curl --progress-bar -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 && \ unzip /chainquery.zip && \
rm /chainquery.zip rm /chainquery.zip
@ -18,7 +20,7 @@ FROM ubuntu:18.04 as app
ADD https://raw.githubusercontent.com/lbryio/chainquery/master/config/default/chainqueryconfig.toml /etc/lbry/chainqueryconfig.toml.orig 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 && \ RUN adduser chainquery --gecos GECOS --shell /bin/bash --disabled-password --home /home/chainquery && \
chown -R chainquery:chainquery /etc/lbry chown -R chainquery:chainquery /etc/lbry
COPY --from=prep ./healthcheck /chainquery /start /usr/bin/ COPY --from=prep ./healthcheck /chainquery /start /bin/busybox /usr/bin/
HEALTHCHECK --interval=1m --timeout=30s \ HEALTHCHECK --interval=1m --timeout=30s \
CMD healthcheck CMD healthcheck
EXPOSE 6300 EXPOSE 6300