Skip to content

Commit

Permalink
refactor(relint-base): Reformat bash runs
Browse files Browse the repository at this point in the history
Seems nice to use `set` to get error checking and push up failures,
which then also allows us to use semicolons instead of double ampersands
to break lines.
  • Loading branch information
ctlong committed Oct 6, 2023
1 parent 25bcc20 commit 285ec24
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions dockerfiles/relint-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM golang:1.20.7-bullseye

RUN \
apt-get update && \
apt-get -y install \
ack \
jq
RUN set -eux; \
apt-get update; \
apt-get -y install \
ack \
jq

# Add trusted relint ca certificate
ARG RELINT_CA_CERTIFICATE
ARG PREVIOUS_RELINT_CA_CERTIFICATE
RUN echo -n "$RELINT_CA_CERTIFICATE" > /usr/local/share/ca-certificates/relint.crt && \
echo -n "$PREVIOUS_RELINT_CA_CERTIFICATE" > /usr/local/share/ca-certificates/previous_relint.crt && \
/usr/sbin/update-ca-certificates -f
RUN set -e; \
echo -n "${RELINT_CA_CERTIFICATE}" > /usr/local/share/ca-certificates/relint.crt; \
echo -n "${PREVIOUS_RELINT_CA_CERTIFICATE}" > /usr/local/share/ca-certificates/previous_relint.crt; \
/usr/sbin/update-ca-certificates -f

0 comments on commit 285ec24

Please sign in to comment.