Add Dockerfile

This commit is contained in:
Torjus Håkestad 2022-04-20 02:41:57 +02:00
parent ec4a1e8294
commit a66d7b9be9

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM golang:alpine as builder
WORKDIR /app
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -o minipaste minipaste.go
FROM alpine:latest
COPY --from=builder /app/minipaste /usr/bin/minipaste
CMD ["/usr/bin/minipaste"]