Switch to scratch image
This commit is contained in:
parent
038842a36b
commit
11a70b6e76
|
@ -1,15 +1,16 @@
|
||||||
FROM golang:alpine AS build
|
FROM golang:alpine AS build
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN apk --no-cache add git
|
RUN apk --no-cache add git ca-certificates
|
||||||
RUN git clone https://codeberg.org/video-prize-ranch/rimgo .
|
RUN git clone https://codeberg.org/video-prize-ranch/rimgo .
|
||||||
|
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN go build
|
RUN CGO_ENABLED=0 go build
|
||||||
|
|
||||||
FROM alpine:latest as bin
|
FROM scratch as bin
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=build /src/rimgo .
|
COPY --from=build /src/rimgo .
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
Loading…
Reference in New Issue