Quellcode wird nun beim Build geladen
This commit is contained in:
@@ -7,4 +7,3 @@ CONTRIBUTING.md
|
||||
docker-compose.yml
|
||||
.ki-workspace
|
||||
*.md
|
||||
!vdo-ninja-source/**/*.md
|
||||
|
||||
@@ -56,12 +56,6 @@ jobs:
|
||||
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: VDO.Ninja Quellcode klonen
|
||||
if: steps.check.outputs.should_build == 'true'
|
||||
run: |
|
||||
git clone --depth 1 ${{ env.UPSTREAM_REPO }} vdo-ninja-source
|
||||
echo "VDO.Ninja Commit: $(cd vdo-ninja-source && git rev-parse --short HEAD)"
|
||||
|
||||
- name: Bei Gitea Registry einloggen
|
||||
if: steps.check.outputs.should_build == 'true'
|
||||
run: |
|
||||
@@ -74,6 +68,8 @@ jobs:
|
||||
if: steps.check.outputs.should_build == 'true'
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg VDO_NINJA_REPO=${{ env.UPSTREAM_REPO }} \
|
||||
--build-arg VDO_NINJA_REF=${{ steps.check.outputs.upstream_tag }} \
|
||||
-t ${{ steps.check.outputs.registry }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:latest \
|
||||
-t ${{ steps.check.outputs.registry }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ steps.check.outputs.upstream_tag }} \
|
||||
.
|
||||
|
||||
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 \
|
||||
|
||||
16
README.md
16
README.md
@@ -154,9 +154,6 @@ docker pull git.techniverse.net/scriptos/vdo-ninja:v29.0
|
||||
Das Image kann auch lokal gebaut werden:
|
||||
|
||||
```bash
|
||||
# VDO.Ninja Quellcode klonen
|
||||
git clone --depth 1 https://github.com/steveseguin/vdo.ninja vdo-ninja-source
|
||||
|
||||
# Docker Image bauen
|
||||
docker build -t vdo-ninja:local .
|
||||
|
||||
@@ -164,6 +161,17 @@ docker build -t vdo-ninja:local .
|
||||
docker run -d -p 8080:80 --name vdo-ninja vdo-ninja:local
|
||||
```
|
||||
|
||||
Der VDO.Ninja-Quellcode wird beim Build automatisch aus dem Upstream-Repository geladen. Ohne weitere Angaben wird der Default-Branch des Upstream-Repositories verwendet.
|
||||
|
||||
Optional kann ein bestimmter Branch oder Tag gebaut werden:
|
||||
|
||||
```bash
|
||||
docker build \
|
||||
--build-arg VDO_NINJA_REF=v29.0 \
|
||||
-t vdo-ninja:v29.0 \
|
||||
.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ Secrets & Variablen
|
||||
@@ -225,4 +233,4 @@ Dieses Repository (Dockerfile, Workflow, Konfiguration) steht unter der [MIT-Liz
|
||||
|
||||
<p align="center">
|
||||
<img src="https://assets.techniverse.net/f1/logos/small/license.png" alt="License" width="15" height="15"> <a href="./LICENSE">License</a> | <img src="https://assets.techniverse.net/f1/logos/small/matrix2.svg" alt="Matrix" width="15" height="15"> <a href="https://matrix.to/#/#community:techniverse.net">Matrix</a> | <img src="https://assets.techniverse.net/f1/logos/small/mastodon2.svg" alt="Mastodon" width="15" height="15"> <a href="https://social.techniverse.net/@donnerwolke">Mastodon</a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user