Switch to scratch image

This commit is contained in:
video-prize-ranch 2022-03-19 15:58:12 -04:00
parent 038842a36b
commit 11a70b6e76
No known key found for this signature in database
GPG Key ID: D8EAA4C5B12A7281
1 changed files with 4 additions and 3 deletions

View File

@ -1,15 +1,16 @@
FROM golang:alpine AS build
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 go mod download
RUN go build
RUN CGO_ENABLED=0 go build
FROM alpine:latest as bin
FROM scratch as bin
WORKDIR /app
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /src/rimgo .
EXPOSE 3000