Create Dockerfile

This commit is contained in:
Rawley Fowler
2022-05-10 13:24:44 -06:00
committed by GitHub
parent 229ad7c457
commit 5afbd3e15b

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# syntax = docker/dockerfile:1
FROM --platform=${BUILDPLATFORM} golang:1.18-bullseye AS build
WORKDIR .
ENV CGO_ENABLED=0
COPY . .
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /bin/rawleydotxyz .
FROM scratch AS bin
COPY --from=build /bin/rawleydotxyz /
FROM golang:1.18-bullseye AS run
EXPOSE 8080/tcp
CMD ["/rawleydotxyz"]