Skip to content

Commit 2b05bd6

Browse files
make heredoc blocks fail on command fail
1 parent 9d191a8 commit 2b05bd6

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

images/algorand/Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,24 @@ ENV GOPATH=/opt/algorand/go
1111
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
1212

1313
RUN <<-EOF
14-
apt-get -y update && \
15-
apt-get -y install \
16-
curl \
17-
git \
18-
make \
19-
gcc \
20-
g++ \
21-
pkg-config \
22-
libboost-dev \
23-
autoconf \
24-
automake \
25-
python3
14+
set -e
15+
apt-get -y update && apt-get -y install \
16+
curl \
17+
git \
18+
make \
19+
gcc \
20+
g++ \
21+
pkg-config \
22+
libboost-dev \
23+
autoconf \
24+
automake \
25+
python3
2626
curl -L -o /tmp/go-linux-amd64.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
2727
tar -C /usr/local -xf /tmp/go-linux-amd64.tar.gz
2828
EOF
2929

3030
RUN <<-EOF
31+
set -e
3132
git clone --branch "$ALGORAND_VERSION" https://github.com/algorand/go-algorand.git
3233
cd go-algorand
3334
./scripts/configure_dev.sh
@@ -43,15 +44,14 @@ RUN <<-EOF
4344
EOF
4445

4546
RUN <<-EOF
47+
set -e
4648
mkdir -p /opt/algorand/.algorand
4749
touch /opt/algorand/.algorand/algod.token
4850
touch /opt/algorand/.algorand/algod.admin.token
4951
EOF
5052

5153
COPY scripts/entrypoint.go /tmp/entrypoint.go
52-
RUN <<-EOF
53-
go build -o /tmp/entrypoint /tmp/entrypoint.go
54-
EOF
54+
RUN go build -o /tmp/entrypoint /tmp/entrypoint.go
5555

5656
FROM gcr.io/distroless/static-debian12:nonroot@sha256:cdf4daaf154e3e27cfffc799c16f343a384228f38646928a1513d925f473cb46 as final
5757

0 commit comments

Comments
 (0)