Updated against a multi stage strategy
This commit is contained in:
parent
607a7c4eef
commit
fdb784a926
1 changed files with 19 additions and 16 deletions
|
@ -1,27 +1,30 @@
|
|||
## This base image is for running latest chainquery
|
||||
FROM ubuntu:18.04
|
||||
LABEL MAINTAINER="chamunks [at] gmail [dot] com"
|
||||
FROM ubuntu:18.04 as prep
|
||||
LABEL MAINTAINER="leopere [at] nixc [dot] us"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install unzip && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD --chown=1000:1000 https://github.com/lbryio/chainquery/releases/download/v1.1.2/chainquery_1.1.2_Linux_x86_64.zip /download
|
||||
RUN cd /download/ && \
|
||||
unzip chainquery_1.1.2_Linux_x86_64.zip && \
|
||||
rm chainquery_1.1.2_Linux_x86_64.zip
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
COPY chainqueryconfig.toml /data/chainqueryconfig.toml
|
||||
COPY start.sh /usr/local/bin/start
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||
|
||||
RUN adduser chainquery --gecos GECOS --shell /bin/bash --disabled-password --home /data/ && \
|
||||
apt-get update && \
|
||||
apt-get -y install unzip wget && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN wget -O /usr/bin/chainquery.zip https://github.com/lbryio/chainquery/releases/download/v1.1.2/chainquery_1.1.2_Linux_x86_64.zip && \
|
||||
cd /usr/bin/ && \
|
||||
unzip chainquery.zip && \
|
||||
rm chainquery.zip && \
|
||||
chown -R 1000:1000 /data && \
|
||||
chmod -R 755 /data
|
||||
|
||||
USER chainquery
|
||||
|
||||
## Expose Chainquery API port
|
||||
EXPOSE 6300 3306
|
||||
EXPOSE 6300
|
||||
|
||||
CMD ["start"]
|
||||
|
|
Loading…
Reference in a new issue