-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Upgrades container to Go 1.21 and distroless (#15)
- Loading branch information
Showing
3 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
# Build image | ||
FROM golang:1.20-alpine as build | ||
FROM golang:1.21-bullseye as build | ||
|
||
WORKDIR /app | ||
|
||
COPY main.go go.mod go.sum ./ | ||
|
||
RUN go build | ||
RUN go mod download && \ | ||
CGO_ENABLED=0 GOOS=linux go build | ||
|
||
# Application image | ||
FROM alpine:3.18 as run | ||
|
||
RUN addgroup -S sqs-exporter && \ | ||
adduser -S -G sqs-exporter sqs-exporter --gecos "" --disabled-password --no-create-home | ||
|
||
USER sqs-exporter | ||
FROM gcr.io/distroless/base-debian11 AS run | ||
|
||
COPY --from=build /app/sqs-prometheus-exporter . | ||
|
||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ./sqs-prometheus-exporter | ||
USER nonroot:nonroot | ||
|
||
ENTRYPOINT [ "./sqs-prometheus-exporter" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v2 | ||
name: sqs-prometheus-exporter | ||
version: 1.1.4 | ||
version: 1.1.5 | ||
description: Helm chart for the SQS Prometheus Exporter | ||
keywords: | ||
- prometheus | ||
|
@@ -15,4 +15,4 @@ sources: | |
maintainers: | ||
- name: John Riebold | ||
email: [email protected] | ||
appVersion: 1.0.4 | ||
appVersion: 1.0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters