run as root

This commit is contained in:
Marcus Noble 2021-02-18 19:41:27 +00:00
parent 26cc6aef7a
commit 4b90ed7ecf

View File

@ -1,5 +1,5 @@
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git && adduser -D -g '' gopher && apk add -U --no-cache ca-certificates
RUN apk update && apk add --no-cache git && apk add -U --no-cache ca-certificates
WORKDIR /app/
ADD go.mod go.sum ./
RUN go mod download
@ -15,8 +15,6 @@ ENV CONSUMER_SECRET=
WORKDIR /app/
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /app/tweetsvg /app/tweetsvg
USER gopher
ENTRYPOINT ["/app/tweetsvg"]