new
This commit is contained in:
parent
05d3a4e55b
commit
57eae3c3ce
7 changed files with 70 additions and 2 deletions
19
Docker/Caddy/Another/Dockerfile.2
Normal file
19
Docker/Caddy/Another/Dockerfile.2
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Stage 1: Build Caddy with required plugins
|
||||
FROM golang:latest AS builder
|
||||
|
||||
# Enable Go Modules and set Go proxy to avoid direct GitHub calls
|
||||
ENV GO111MODULE=on
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
|
||||
# Install xcaddy
|
||||
RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
|
||||
|
||||
# Build Caddy with required plugins
|
||||
RUN xcaddy build \
|
||||
--with github.com/lucaslorentz/caddy-docker-proxy/v2 \
|
||||
--with github.com/crowdsecurity/caddy-bouncer/v2
|
||||
# Stage 2: Create final lightweight image
|
||||
FROM caddy:latest
|
||||
|
||||
# Copy built Caddy binary from builder stage
|
||||
COPY --from=builder /go/bin/caddy /usr/bin/caddy
|
||||
Loading…
Add table
Add a link
Reference in a new issue