Quellcode wird nun beim Build geladen
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -2,6 +2,21 @@
|
||||
# Basierend auf nginx:alpine für minimale Imagegröße
|
||||
# Quelle: https://github.com/steveseguin/vdo.ninja
|
||||
|
||||
ARG VDO_NINJA_REPO=https://github.com/steveseguin/vdo.ninja
|
||||
ARG VDO_NINJA_REF=
|
||||
|
||||
FROM alpine:3.20 AS source
|
||||
|
||||
ARG VDO_NINJA_REPO
|
||||
ARG VDO_NINJA_REF
|
||||
|
||||
RUN apk add --no-cache ca-certificates git \
|
||||
&& if [ -n "${VDO_NINJA_REF}" ]; then \
|
||||
git clone --depth 1 --branch "${VDO_NINJA_REF}" "${VDO_NINJA_REPO}" /vdo-ninja-source; \
|
||||
else \
|
||||
git clone --depth 1 "${VDO_NINJA_REPO}" /vdo-ninja-source; \
|
||||
fi
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
LABEL maintainer="Patrick Asmus <support@techniverse.net>"
|
||||
@@ -13,8 +28,8 @@ LABEL org.opencontainers.image.licenses="AGPL-3.0"
|
||||
# Eigene nginx-Konfiguration
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# VDO.Ninja Quelldateien (wird im CI-Workflow geklont)
|
||||
COPY vdo-ninja-source/ /usr/share/nginx/html/
|
||||
# VDO.Ninja Quelldateien aus dem Build-Stage übernehmen
|
||||
COPY --from=source /vdo-ninja-source/ /usr/share/nginx/html/
|
||||
|
||||
# Nicht benötigte Dateien entfernen
|
||||
RUN rm -rf /usr/share/nginx/html/.git \
|
||||
|
||||
Reference in New Issue
Block a user