diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-02-22 09:59:10 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-02-22 09:59:10 -0500 |
commit | f36f77472a82d6ebfac153aed6d17f154ae239a6 (patch) | |
tree | d749ecc2ebf86a39b15ac3026d3e100d0276442b /resources/Dockerfile | |
parent | 2cb9e5fe823391c09a99424138192d0fbec727af (diff) |
Good foundations
Diffstat (limited to 'resources/Dockerfile')
-rw-r--r-- | resources/Dockerfile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/resources/Dockerfile b/resources/Dockerfile new file mode 100644 index 0000000..89c1ac3 --- /dev/null +++ b/resources/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:latest AS setup +WORKDIR /app + +COPY go.* ./ +COPY cmd cmd +COPY internal internal + +RUN go mod download && go mod verify + +RUN CGO_ENABLED=0 GOOS=linux go build -o /application cmd/songlinkr/main.go + +FROM alpine:latest AS compressor + +RUN apk add --no-cache upx + +COPY --from=setup + +FROM scratch AS package + +COPY --from=setup /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=setup /application /application + +CMD ["/application"] |