Skip to content

Commit

Permalink
Non-root user docker image for Loki. (#1706)
Browse files Browse the repository at this point in the history
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
  • Loading branch information
cyriltovena authored Mar 17, 2020
1 parent 3abee78 commit 45b51ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ RUN make clean && (if [ "${TOUCH_PROTOS}" ]; then make touch-protos; fi) && make

FROM alpine:3.9
RUN apk add --update --no-cache ca-certificates
RUN addgroup -g 1000 -S loki && \
adduser -u 1000 -S loki -G loki
USER loki
COPY --from=build /src/loki/cmd/loki/loki /usr/bin/loki
COPY cmd/loki/loki-local-config.yaml /etc/loki/local-config.yaml
EXPOSE 80
Expand Down

0 comments on commit 45b51ef

Please sign in to comment.