lbry-docker/chainquery/Dockerfile

39 lines
1.5 KiB
Text
Raw Normal View History

## This base image is for running latest chainquery
2018-10-16 09:28:03 +02:00
FROM ubuntu:18.04 as prep
LABEL MAINTAINER="leopere [at] nixc [dot] us"
2018-10-16 09:28:03 +02:00
RUN apt-get update && \
apt-get -y install unzip curl && \
apt-get autoclean -y && \
rm -rf /var/lib/apt/lists/* && \
2018-11-04 17:39:32 +01:00
mkdir /download
2018-11-05 00:17:23 +01:00
RUN curl -L -o /download/chainquery.zip $(curl -s https://api.github.com/repos/lbryio/chainquery/releases | fgrep 'Linux_x86_64.zip' | grep download | head -n 1 | cut -d'"' -f4) && \
cd /download && \
2018-11-04 18:09:45 +01:00
ls -lAh /download && pwd && \
unzip chainquery.zip && \
rm chainquery.zip
2018-11-05 00:17:23 +01:00
## I really want to use this instead of all the curl stuff at one point.
# ADD --chown=1000:1000 https://github.com/lbryio/chainquery/releases/download/latest/chainquery_latest_Linux_x86_64.zip /download
2018-10-16 09:28:03 +02:00
## Switch to Alpine eventually we might need to compile in Alpine for this.
FROM ubuntu:18.04 as app
RUN adduser chainquery --gecos GECOS --shell /bin/bash --disabled-password --home /home/chainquery
2018-11-05 00:18:40 +01:00
COPY --from=0 /download/chainquery /usr/bin
2018-11-05 00:17:23 +01:00
2018-11-05 00:18:40 +01:00
# ADD --chown=1000:1000 https://github.com/lbryio/chainquery/releases/download/latest/chainquery_latest_Linux_x86_64.zip /usr/bin
COPY chainqueryconfig.toml /etc/chainquery/
ADD --chown=1000:1000 https://raw.githubusercontent.com/lbryio/chainquery/master/config/default/chainqueryconfig.toml /etc/chainquery/chainqueryconfig.toml.orig
2018-10-16 09:28:03 +02:00
COPY start.sh /usr/local/bin/start
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
2018-10-03 20:30:18 +02:00
USER chainquery
## Expose Chainquery API port
2018-10-16 09:28:03 +02:00
EXPOSE 6300
CMD ["start"]