Files
virtual-appstore/Dockerfile
jbergner 3e217b8ef4
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
data-fix
2025-09-06 21:03:05 +02:00

27 lines
669 B
Docker

FROM golang:1.24-alpine AS build
WORKDIR /src
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/app
FROM alpine:3.22
WORKDIR /app
COPY --from=build /bin/app /app/app
COPY apps.json /data/apps.json
COPY templates /app/templates
COPY static /app/static
ENV SERVER_MODE="https" \
ADDR=":8443" \
APP_TITLE="Mein App-Store" \
APPS_JSON="/data/apps.json" \
STATIC_DIR="/app/static" \
TEMPLATE_DIR="/app/templates" \
TLS_CERT_FILE="/app/pub.pem" \
TLS_KEY_FILE="/app/pri.pem" \
HSTS="true" \
HTTP_REDIRECT_ADDR=":8080" \
HTTP_REDIRECT_ENABLED="true"
EXPOSE 8080 8443
CMD ["/app/app"]