Fix dockerfile
This commit is contained in:
parent
9a769fb963
commit
bc8649fac3
10
Dockerfile
10
Dockerfile
@ -7,16 +7,12 @@ ARG TARGETARCH
|
|||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
RUN apk update && apk add --no-cache --update gcc musl-dev git && adduser -D -g '' gopher && apk add -U --no-cache ca-certificates
|
RUN apk update && apk add --no-cache --update gcc musl-dev git && adduser -D -g '' gopher && apk add -U --no-cache ca-certificates
|
||||||
|
RUN go get github.com/mattn/go-sqlite3
|
||||||
ADD go.mod go.sum ./
|
ADD go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o gopherss .
|
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o gopherss .
|
||||||
|
|
||||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} scratch
|
COPY ./views /app/
|
||||||
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/gopherss /app/gopherss
|
|
||||||
COPY ./views /app/views/
|
|
||||||
USER gopher
|
|
||||||
ENTRYPOINT ["/app/gopherss"]
|
ENTRYPOINT ["/app/gopherss"]
|
||||||
|
Loading…
Reference in New Issue
Block a user