Skip to content

Commit

Permalink
Simplify Dockerfile (zcash#6906)
Browse files Browse the repository at this point in the history
  • Loading branch information
y4ssi authored Sep 26, 2024
1 parent 7a93b4f commit b5505ea
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:11
FROM debian:12

RUN apt-get update \
&& apt-get install -y gnupg2 apt-transport-https curl
Expand All @@ -14,7 +14,7 @@ ARG ZCASHD_USER=zcashd
ARG ZCASHD_UID=2001

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $ZCASH_SIGNING_KEY_ID \
&& echo "deb [arch=amd64] https://apt.z.cash/ bullseye main" > /etc/apt/sources.list.d/zcash.list \
&& echo "deb [arch=amd64] https://apt.z.cash/ bookworm main" > /etc/apt/sources.list.d/zcash.list \
&& apt-get update

RUN if [ -z "$ZCASH_VERSION" ]; \
Expand All @@ -23,15 +23,18 @@ RUN if [ -z "$ZCASH_VERSION" ]; \
fi; \
zcashd --version

RUN useradd --home-dir /srv/$ZCASHD_USER \
RUN useradd --home-dir "/srv/$ZCASHD_USER" \
--shell /bin/bash \
--create-home \
--uid $ZCASHD_UID\
$ZCASHD_USER
USER $ZCASHD_USER
WORKDIR /srv/$ZCASHD_USER
RUN mkdir -p /srv/$ZCASHD_USER/.zcash/ \
&& touch /srv/$ZCASHD_USER/.zcash/zcash.conf
--uid "$ZCASHD_UID" \
"$ZCASHD_USER"

RUN mkdir -p "/srv/$ZCASHD_USER/.zcash/" \
&& touch "/srv/$ZCASHD_USER/.zcash/zcash.conf" \
&& chown -R zcashd "/srv/$ZCASHD_USER"

WORKDIR "/srv/$ZCASHD_USER"
ENV HOME="/srv/$ZCASHD_USER"

ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit b5505ea

Please sign in to comment.