A toy webserver with variable expansion based on connecting client

This commit is contained in:
2026-04-03 14:46:04 +02:00
commit 07d33913ca
9 changed files with 1180 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM golang:alpine AS builder
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY main.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o clab-webserver .
FROM alpine:latest
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /build/clab-webserver .
COPY docroot/ docroot/
EXPOSE 80
ENTRYPOINT ["/app/clab-webserver"]
CMD ["-listen", ":80"]