Files
edge-wol/Dockerfile
jbergner 5c51c3f6a2
All checks were successful
release-tag / release-image (push) Successful in 1m28s
build-binaries / build (, amd64, linux) (push) Successful in 10m5s
build-binaries / build (, arm, 7, linux) (push) Successful in 10m5s
build-binaries / build (, arm64, linux) (push) Successful in 10m3s
build-binaries / build (.exe, amd64, windows) (push) Successful in 10m6s
build-binaries / release (push) Successful in 32s
Integrierten HTTPS-Server aktiviert und an ENV gebunden
2025-08-06 05:59:19 +02:00

39 lines
974 B
Docker
Raw Permalink 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/edgewol
# 2. Runtime-Stage
FROM alpine:3.22
# HTTPS-Callouts in Alpine brauchen ca-certificates
RUN apk add --no-cache ca-certificates
RUN mkdir /data
#RUN mkdir /dynamicsrc
#RUN mkdir /tempsrc
COPY --from=builder /bin/edgewol /bin/edgewol
COPY ./static /data/static
# COPY ./static /tempsrc/static
#COPY ./dynamicsrc /dynamicsrc
# Default listens on :8080 siehe main.go
EXPOSE 8080
# Environment defaults; können per compose überschrieben werden
ENV EW_USERNAME=admin \
EW_PASSWORD=admin \
EW_DB=/data/machines.json \
EW_PRODUCTIVE=true \
EW_FORCEINSECURECOOKIE=false \
HTTP_PORT=8080 \
HTTP_TLS=false \
HTTP_TLS_CERTIFICATE=./server-cert.pem \
HTTP_TLS_PRIVATEKEY=./server-key.pem
ENTRYPOINT ["/bin/edgewol"]