Add Dockerfile

This commit is contained in:
akp 2024-04-05 20:56:45 +01:00
parent 888ce6656d
commit 7e86e599e6
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM golang:1 as builder
RUN mkdir /build
ADD . /build
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -buildvcs=false -installsuffix cgo -ldflags '-extldflags "-static" -s -w' -o main git.tdpain.net/codemicro/magicbox
FROM alpine
COPY --from=builder /build/main /
WORKDIR /run
CMD ["../main"]