wownero/Dockerfile

67 lines
1.6 KiB
Docker
Raw Permalink Normal View History

# Multistage docker build, requires docker 17.05
# builder stage
2021-09-11 16:05:56 -06:00
FROM ubuntu:20.04 as builder
RUN set -ex && \
apt-get update && \
2021-09-11 16:05:56 -06:00
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install \
automake \
autotools-dev \
bsdmainutils \
build-essential \
ca-certificates \
2021-09-11 16:05:56 -06:00
ccache \
cmake \
curl \
2021-09-11 16:05:56 -06:00
git \
libtool \
pkg-config \
gperf
WORKDIR /src
COPY . .
ARG NPROC
RUN set -ex && \
git submodule init && git submodule update && \
rm -rf build && \
if [ -z "$NPROC" ] ; \
2021-09-11 16:05:56 -06:00
then make -j$(nproc) depends target=x86_64-linux-gnu ; \
else make -j$NPROC depends target=x86_64-linux-gnu ; \
fi
# runtime stage
2021-09-11 16:05:56 -06:00
FROM ubuntu:20.04
RUN set -ex && \
apt-get update && \
apt-get --no-install-recommends --yes install ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt
2021-09-11 16:05:56 -06:00
COPY --from=builder /src/build/x86_64-linux-gnu/release/bin /usr/local/bin/
2023-02-01 00:20:21 -07:00
# Create wownero user
RUN adduser --system --group --disabled-password wownero && \
mkdir -p /wallet /home/wownero/.wownero && \
chown -R wownero:wownero /home/wownero/.wownero && \
chown -R wownero:wownero /wallet
2019-03-09 15:22:03 -07:00
# Contains the blockchain
2023-02-01 00:20:21 -07:00
VOLUME /home/wownero/.wownero
# Generate your wallet via accessing the container and run:
# cd /wallet
2023-02-01 00:20:21 -07:00
# wownero-wallet-cli
VOLUME /wallet
2023-02-01 00:20:21 -07:00
EXPOSE 34567
EXPOSE 34568
2023-02-01 00:20:21 -07:00
# switch to user wownero
USER wownero
2019-03-09 15:22:03 -07:00
2023-02-01 00:20:21 -07:00
ENTRYPOINT ["wownerod"]
CMD ["--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=34567", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=34568", "--non-interactive", "--confirm-external-bind"]