diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..c981a98 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,10 @@ +FROM golang:latest as build +RUN latest_version=$(curl https://git.atik.me/Krio/BasicWeb/releases/latest | grep -oP '(?<=tag/).*(?=\")') \ + && wget https://git.atik.me/Krio/BasicWeb/archive/${latest_version}.tar.gz \ + && tar xvzf *.tar.gz \ + && cd basicweb \ + && CGO_ENABLED=0 go build -ldflags="-w -s" + +FROM scratch +COPY --from=build /go/basicweb/basicweb . +CMD ["./basicweb"]