run as root
This commit is contained in:
parent
26cc6aef7a
commit
4b90ed7ecf
@ -1,5 +1,5 @@
|
|||||||
FROM golang:alpine AS builder
|
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/
|
WORKDIR /app/
|
||||||
ADD go.mod go.sum ./
|
ADD go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
@ -15,8 +15,6 @@ ENV CONSUMER_SECRET=
|
|||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
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
|
COPY --from=builder /app/tweetsvg /app/tweetsvg
|
||||||
USER gopher
|
|
||||||
|
|
||||||
ENTRYPOINT ["/app/tweetsvg"]
|
ENTRYPOINT ["/app/tweetsvg"]
|
||||||
|
Loading…
Reference in New Issue
Block a user