Skip to content

Commit

Permalink
chore: Switches to non-root user in container
Browse files Browse the repository at this point in the history
  • Loading branch information
jmriebold committed Aug 29, 2020
1 parent 8d86d74 commit 903853f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ RUN go build
# Application image
FROM alpine:3.12 as run

RUN addgroup -S sqs-exporter && \
adduser -S -G sqs-exporter sqs-exporter --gecos "" --disabled-password --no-create-home

USER sqs-exporter

COPY --from=build /app/sqs-prometheus-exporter .

COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Expand Down

0 comments on commit 903853f

Please sign in to comment.