new
This commit is contained in:
parent
05d3a4e55b
commit
57eae3c3ce
7 changed files with 70 additions and 2 deletions
10
Docker/Caddy/Another/Dockerfile
Normal file
10
Docker/Caddy/Another/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FROM caddy:builder AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/hslatman/caddy-crowdsec-bouncer \
|
||||
--with github.com/mholt/caddy-events-exec \
|
||||
--with github.com/lucaslorentz/caddy-docker-proxy/v2
|
||||
FROM caddy:latest
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
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
|
||||
20
Docker/Caddy/Another/Dockerfile.old
Normal file
20
Docker/Caddy/Another/Dockerfile.old
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM golang:latest AS builder
|
||||
|
||||
# Enable Go Modules and force Go proxy usage
|
||||
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
|
||||
|
||||
# Create a lightweight final image
|
||||
FROM caddy:latest
|
||||
|
||||
# Copy built Caddy binary from the builder stage
|
||||
COPY --from=builder /go/bin/caddy /usr/bin/caddy
|
||||
|
||||
BIN
Docker/Caddy/Another/go-modules.tar.gz
Normal file
BIN
Docker/Caddy/Another/go-modules.tar.gz
Normal file
Binary file not shown.
3
Docker/Caddy/Another/go.mod
Normal file
3
Docker/Caddy/Another/go.mod
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module tempmod
|
||||
|
||||
go 1.24.1
|
||||
16
Docker/Caddy/DockerFile
Normal file
16
Docker/Caddy/DockerFile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FROM golang:latest AS builder
|
||||
|
||||
# Install xcaddy
|
||||
RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
|
||||
|
||||
# Build Caddy with necessary plugins
|
||||
RUN xcaddy build \
|
||||
--with github.com/lucaslorentz/caddy-docker-proxy/v2 \
|
||||
--with github.com/crowdsecurity/caddy-bouncer
|
||||
|
||||
# Create a lightweight final image
|
||||
FROM caddy:latest
|
||||
|
||||
# Copy built Caddy binary from the builder stage
|
||||
COPY --from=builder /go/bin/caddy /usr/bin/caddy
|
||||
|
||||
|
|
@ -6,8 +6,8 @@ configs:
|
|||
|
||||
services:
|
||||
caddy:
|
||||
# image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||
image: ghcr.io/serfriz/caddy-crowdsec:latest
|
||||
image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||
#image: ghcr.io/serfriz/caddy-crowdsec:latest
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue