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"]