Skip to content

Commit 0634cb5

Browse files
make heredoc blocks fail on command fail, fix strip path
1 parent 8285528 commit 0634cb5

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

images/dogecoind/Dockerfile

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,47 @@ ARG VERSION=v1.14.9
66
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
77

88
RUN <<-EOF
9-
apt-get -y update && \
10-
apt-get -y install \
11-
git \
12-
build-essential \
13-
cmake \
14-
libtool \
15-
pkg-config \
16-
curl
9+
set -e
10+
apt-get -y update && apt-get -y install \
11+
git \
12+
build-essential \
13+
cmake \
14+
libtool \
15+
pkg-config \
16+
curl
1717
EOF
1818

1919
RUN git clone --single-branch --branch "${VERSION}" https://github.com/dogecoin/dogecoin.git /opt/dogecoin
2020

2121
WORKDIR /opt/dogecoin
2222

2323
RUN <<-EOF
24-
make -C /opt/dogecoin/depends/ -j $(getconf _NPROCESSORS_ONLN) NO_QT=1 NO_QR=1 NO_WALLET=1 NO_BDB=1 && \
25-
./autogen.sh && \
24+
set -e
25+
make -C /opt/dogecoin/depends/ -j $(getconf _NPROCESSORS_ONLN) NO_QT=1 NO_QR=1 NO_WALLET=1 NO_BDB=1
26+
./autogen.sh
2627
./configure \
2728
--disable-wallet \
2829
--without-gui \
2930
--disable-tests \
3031
--disable-bench \
31-
--prefix=/opt/dogecoin/depends/x86_64-pc-linux-gnu/ && \
32-
make -j $(getconf _NPROCESSORS_ONLN) && \
33-
make install && \
34-
find /opt/dogecoin/go/bin -type f -executable -exec strip -s {} + 2>/dev/null || true
32+
--prefix=/opt/dogecoin/depends/x86_64-pc-linux-gnu/
33+
make -j $(getconf _NPROCESSORS_ONLN)
34+
make install
35+
find /opt/dogecoin/depends/x86_64-pc-linux-gnu/bin -type f -executable -exec strip -s {} + 2>/dev/null || true
3536
EOF
3637

3738
COPY dogecoin.conf /opt/dogecoin/.dogecoin/dogecoin.conf
3839

3940
RUN <<-EOF
40-
mkdir -p /opt/dogecoin/.dogecoin/db && \
41-
chown -R 65532:65532 /opt/dogecoin/
41+
set -e
42+
mkdir -p /opt/dogecoin/.dogecoin/db
4243
EOF
4344

4445
FROM gcr.io/distroless/cc-debian12:nonroot@sha256:d1b8e4c52be1111aa108e959ef2a822299bb70fd1819dd250871a2601ca1e4b6 as final
4546

4647
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
4748

48-
COPY --from=build /opt/dogecoin/depends/x86_64-pc-linux-gnu/bin/ /opt/dogecoin/bin/
49-
COPY --from=build /opt/dogecoin/.dogecoin/ /opt/dogecoin/.dogecoin/
49+
COPY --from=build --chown=65532:65532 /opt/dogecoin/depends/x86_64-pc-linux-gnu/bin/ /opt/dogecoin/bin/
50+
COPY --from=build --chown=65532:65532 /opt/dogecoin/.dogecoin/ /opt/dogecoin/.dogecoin/
5051

5152
ENTRYPOINT ["/opt/dogecoin/bin/dogecoind", "-conf=/opt/dogecoin/.dogecoin/dogecoin.conf", "-datadir=/opt/dogecoin/.dogecoin/db", "-printtoconsole", "-txindex=1"]

0 commit comments

Comments
 (0)