Skip to content

Commit

Permalink
fix(docker): avoid installing curl for the RDS certificates (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
malept authored Apr 11, 2024
1 parent 4b01a40 commit 9b5e60a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /zoneinfo.zip
ENV ZONEINFO=/zoneinfo.zip

# Install certificates for RDS connectivity.
RUN apk add --no-cache curl \
&& curl "https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem" \
--output /usr/local/share/ca-certificates/global-bundle.pem \
&& update-ca-certificates \
&& apk del --no-cache curl
RUN wget --output-document /usr/local/share/ca-certificates/global-bundle.pem \
"https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem" \
&& update-ca-certificates

## <<Stencil::Block(afterBuild)>>

Expand Down
8 changes: 3 additions & 5 deletions templates/deployments/appname/Dockerfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /zoneinfo.zip
ENV ZONEINFO=/zoneinfo.zip

# Install certificates for RDS connectivity.
RUN apk add --no-cache curl \
&& curl "https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem" \
--output /usr/local/share/ca-certificates/global-bundle.pem \
&& update-ca-certificates \
&& apk del --no-cache curl
RUN wget --output-document /usr/local/share/ca-certificates/global-bundle.pem \
"https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem" \
&& update-ca-certificates

## <<Stencil::Block(afterBuild)>>
{{ file.Block "afterBuild" }}
Expand Down

0 comments on commit 9b5e60a

Please sign in to comment.