28 lines
651 B
Docker
28 lines
651 B
Docker
# -------- Dockerfile (Multi-Stage Build) --------
|
||
# 1. Builder-Stage
|
||
FROM golang:1.24-alpine AS builder
|
||
|
||
WORKDIR /app
|
||
COPY go.* ./
|
||
RUN go mod download
|
||
COPY . .
|
||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/vcc
|
||
|
||
# 2. Runtime-Stage
|
||
FROM alpine:3.22
|
||
|
||
# HTTPS-Callouts in Alpine brauchen ca-certificates
|
||
RUN apk add --no-cache ca-certificates
|
||
RUN mkdir /web
|
||
COPY --from=builder /bin/vcc /bin/vcc
|
||
COPY ./web /web
|
||
# Default listens on :8090 – siehe main.go
|
||
EXPOSE 8090
|
||
|
||
# Environment defaults; können per compose überschrieben werden
|
||
ENV CLIPBOARD_TOKEN="" \
|
||
CLIPBOARD_DATA="" \
|
||
PORT=":8090" \
|
||
MAX_PER_ROOM=200
|
||
|
||
ENTRYPOINT ["/bin/vcc"] |