Skip to content

Commit

Permalink
chore: Upgrades container to Go 1.21 and distroless (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmriebold authored Aug 9, 2023
1 parent 8a42a99 commit ed60492
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
18 changes: 7 additions & 11 deletions Dockerfile
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" ]
4 changes: 2 additions & 2 deletions chart/sqs-prometheus-exporter/Chart.yaml
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
Expand All @@ -15,4 +15,4 @@ sources:
maintainers:
- name: John Riebold
email: [email protected]
appVersion: 1.0.4
appVersion: 1.0.5
2 changes: 1 addition & 1 deletion chart/sqs-prometheus-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ app:

image:
repository: jmriebold/sqs-prometheus-exporter
tag: 1.0.4
tag: 1.0.5

deployment:
resources:
Expand Down

0 comments on commit ed60492

Please sign in to comment.