Created
March 3, 2020 19:12
-
-
Save emmiep/446ad80462d0881f68d2f02f95dde837 to your computer and use it in GitHub Desktop.
Revisions
-
emmiep created this gist
Mar 3, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ FROM --platform=${BUILDPLATFORM} golang:1.14 AS build ARG TARGETOS ARG TARGETARCH ARG caddy_version=v1.0.4 ENV GOOS=${TARGETOS} ENV GOARCH=${TARGETARCH} WORKDIR /usr/local/src/caddy COPY ./main.go ./ RUN go mod init caddy && \ go get github.com/caddyserver/caddy@${caddy_version} && \ go build FROM busybox:1.31-glibc COPY --from=build /usr/local/src/caddy/caddy /usr/local/bin/caddy CMD ["/usr/local/bin/caddy"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ package main import ( "github.com/caddyserver/caddy/caddy/caddymain" ) func main() { caddymain.Run() }