Files
virtual-clipboard-generator/Dockerfile
jbergner 67269fd91e
All checks were successful
release-tag / release-image (push) Successful in 1m29s
build-binaries / build (, amd64, linux) (push) Has been skipped
build-binaries / build (, arm, 7, linux) (push) Has been skipped
build-binaries / build (, arm64, linux) (push) Has been skipped
build-binaries / build (.exe, amd64, windows) (push) Has been skipped
build-binaries / release (push) Has been skipped
RC-1.0
2025-09-06 17:18:43 +02:00

53 lines
1.2 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -------- 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/vcg
# 2. Runtime-Stage
FROM alpine:3.22
# HTTPS-Callouts in Alpine brauchen ca-certificates
RUN apk add --no-cache ca-certificates
COPY --from=builder /bin/vcg /bin/vcg
# Default listens on :8090 siehe main.go
EXPOSE 8090
# Environment defaults; können per compose überschrieben werden
ENV PWGEN_LENGTH=14 \
PWGEN_MIN_LOWER=2 \
PWGEN_MIN_UPPER=2 \
PWGEN_MIN_DIGITS=2 \
PWGEN_MIN_SYMBOLS=2 \
PWGEN_CHARSET="" \
PWGEN_EXCLUDE="" \
PWGEN_NO_AMBIGUOUS=true \
PWGEN_NO_SEQ=true \
PWGEN_NO_REPEAT=true \
PWGEN_UNIQUE=false \
PWGEN_TEMPLATE= \
PWGEN_SYMBOLS=symbols \
PWGEN_COUNT=1 \
PWGEN_JSON=false \
PWGEN_CLIPBOARD_BASE=http://clipboard:8080 \
PWGEN_CLIPBOARD_ROOM=default \
PWGEN_CLIPBOARD_AUTHOR=PWGEN \
PWGEN_CLIPBOARD_TYPE=text \
PWGEN_CLIPBOARD_TOKEN="" \
CLIPBOARD_TOKEN="" \
PWGEN_SEND_URL="" \
PWGEN_SEND_FIELD="content" \
PWGEN_SEND_HEADERS="" \
PWGEN_SEND_METHOD="POST" \
PWGEN_DRY_RUN=false \
PWGEN_TIMEOUT="" \
PWGEN_WEB=true \
PWGEN_WEB_ADDR=":8090" \
PWGEN_WEB_USER="" \
PWGEN_WEB_PASS=""
ENTRYPOINT ["/bin/vcg"]