Files
edge-wol/Dockerfile
jbergner 7c08015cb4
Some checks failed
release-tag / release-image (push) Successful in 4m33s
build-binaries / build (, arm, 7, linux) (push) Has been cancelled
build-binaries / build (, arm64, linux) (push) Has been cancelled
build-binaries / build (, amd64, linux) (push) Has been cancelled
build-binaries / build (.exe, amd64, windows) (push) Has been cancelled
build-binaries / release (push) Has been cancelled
Anpassung für Login-Problem bei Testverbindungen mit Cookie Secure=True. Umgebungsvariable EW_FORCEINSECURECOOKIE hinzugefügt. Wenn Produktiv und Var = True Dann Autoset Wenn False dann Secure! Wenn Produktiv = False Dann Autoset.
2025-08-06 05:48:01 +02:00

35 lines
844 B
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/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
ENTRYPOINT ["/bin/edgewol"]