From 94f903b625d88f1144873d9b4f4f369c295fc143 Mon Sep 17 00:00:00 2001 From: Krio Date: Sat, 4 Sep 2021 12:22:27 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=81=D0=B1=D0=BE=D1=80=D0=BE=D1=87=D0=BD=D1=8B=D0=B9?= =?UTF-8?q?=20=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 build/Dockerfile 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"]