Add build-scripts with docker

This commit is contained in:
2023-04-11 11:36:49 +02:00
parent ca1b66dc99
commit 34bfe19158
3 changed files with 29 additions and 0 deletions

13
build/Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
# ---- Build ----
FROM golang:1.19-alpine AS build
WORKDIR /build
# Copy sources
ADD . .
# Get dependencies
RUN go get ./cmd/app
# Compile
RUN CGO_ENABLED=0 go build -a -o app ./cmd/app
# ---- Output ----
FROM scratch AS export-stage
COPY --from=build /build/app .