From 21b86ff24b451ba01243586d6330df24e2339882 Mon Sep 17 00:00:00 2001 From: Dominic Grimm Date: Tue, 11 Apr 2023 13:23:17 +0200 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index d5fb8f2..cca6ac0 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,24 @@ docker pull git.dergrimm.net/dergrimm/gbox:1.0.6 ``` https://git.dergrimm.net/dergrimm/-/packages/container/gbox + +```dockerfile +FROM docker.io/alpine/git:2.36.3 as puller +WORKDIR /usr/src/gbox +ARG GBOX_VERSION +RUN git clone --depth 1 --branch v${GBOX_VERSION} https://github.com/gbox-proxy/gbox.git . + +FROM docker.io/golang:1.17.13-alpine3.16 as builder +WORKDIR /usr/src/gbox +COPY --from=puller /usr/src/gbox . +RUN go build ./cmd/main.go + +FROM docker.io/caddy:2.6.4-alpine +LABEL maintainer="Dominic Grimm " \ + org.opencontainers.image.description="Custom build of the GBox Proxy" \ + org.opencontainers.image.licenses="Apache License 2.0" \ + org.opencontainers.image.source="https://git.dergrimm.net/dergrimm/gbox" \ + org.opencontainers.image.url="https://git.dergrimm.net/dergrimm/gbox" +COPY --from=builder /usr/src/gbox/Caddyfile.dist /etc/caddy/Caddyfile +COPY --from=builder /usr/src/gbox/main /usr/bin/caddy +```