2023-04-11 11:21:43 +00:00
|
|
|
# Custom Dockerfile for the awesome [GBox Proxy](https://github.com/gbox-proxy/gbox)
|
|
|
|
|
|
|
|
```bash
|
2023-04-11 12:51:19 +00:00
|
|
|
docker pull git.dergrimm.net/dergrimm/gbox:v1.0.6
|
2023-04-11 11:21:43 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
https://git.dergrimm.net/dergrimm/-/packages/container/gbox
|
2023-04-11 11:23:17 +00:00
|
|
|
|
|
|
|
```dockerfile
|
|
|
|
FROM docker.io/alpine/git:2.36.3 as puller
|
|
|
|
WORKDIR /usr/src/gbox
|
|
|
|
ARG GBOX_VERSION
|
2023-04-11 12:51:19 +00:00
|
|
|
RUN git clone --depth 1 --branch ${GBOX_VERSION} https://github.com/gbox-proxy/gbox.git .
|
2023-04-11 11:23:17 +00:00
|
|
|
|
|
|
|
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 <dominic@dergrimm.net>" \
|
|
|
|
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
|
|
|
|
```
|