Update Dockerfile - Creating witness_node_data_dir and taking example config.ini (will be used to mount so config can be changed on fly)

This commit is contained in:
Rily Dunlap 2023-01-18 20:05:57 +00:00
parent e5c1c3cd1b
commit f1f969b207

View file

@ -37,6 +37,7 @@ RUN \
# Add local source
ADD . peerplays
# Configure and build Peerplays
RUN \
cd peerplays && \
@ -50,14 +51,19 @@ RUN \
# Fresh image for running compiled binaries
FROM ubuntu:20.04
WORKDIR /home/peerplays/witness_node_data_dir/
COPY --from=deps /home/peerplays/peerplays/example.config.ini /home/peerplays/witness_node_data_dir/config.ini
RUN apt update -y && \
DEBIAN_FRONTEND=noninteractive apt install -y \
curl \
nano \
libzmq5 && \
groupadd peerplays && \
useradd -rm -d /home/peerplays -s /bin/bash -g peerplays -u 1000 peerplays && \
chown -R peerplays:peerplays /home/peerplays/
USER peerplays
WORKDIR /home/peerplays/
@ -65,7 +71,7 @@ WORKDIR /home/peerplays/
# Copying the build artifacts from the above ubuntu-build image
COPY --from=deps /home/peerplays/peerplays/build/programs/witness_node/witness_node .
COPY --from=deps /home/peerplays/peerplays/build/programs/cli_wallet/cli_wallet .
COPY --from=deps /home/peerplays/peerplays/genesis-mainet.json .
# Peerplays RPC
EXPOSE 8090