Docker-Build für Compose und Registry-Push robuster machen
This commit is contained in:
@@ -67,19 +67,16 @@ jobs:
|
|||||||
- name: Docker Image bauen
|
- name: Docker Image bauen
|
||||||
if: steps.check.outputs.should_build == 'true'
|
if: steps.check.outputs.should_build == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker buildx build \
|
||||||
|
--provenance=false \
|
||||||
|
--sbom=false \
|
||||||
--build-arg VDO_NINJA_REPO=${{ env.UPSTREAM_REPO }} \
|
--build-arg VDO_NINJA_REPO=${{ env.UPSTREAM_REPO }} \
|
||||||
--build-arg VDO_NINJA_REF=${{ steps.check.outputs.upstream_tag }} \
|
--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 }}:latest \
|
||||||
-t ${{ steps.check.outputs.registry }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ steps.check.outputs.upstream_tag }} \
|
-t ${{ steps.check.outputs.registry }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ steps.check.outputs.upstream_tag }} \
|
||||||
|
--push \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Docker Image pushen
|
|
||||||
if: steps.check.outputs.should_build == 'true'
|
|
||||||
run: |
|
|
||||||
docker push ${{ steps.check.outputs.registry }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:latest
|
|
||||||
docker push ${{ steps.check.outputs.registry }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ steps.check.outputs.upstream_tag }}
|
|
||||||
|
|
||||||
- name: Build-Zusammenfassung
|
- name: Build-Zusammenfassung
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
# Geklonter VDO.Ninja Quellcode (wird nur im CI verwendet)
|
# Geklonter VDO.Ninja Quellcode (wird nur im CI verwendet)
|
||||||
vdo-ninja-source/
|
vdo-ninja-source/
|
||||||
.vdo-ninja-source/
|
.vdo-ninja-source/
|
||||||
|
.ki-workspace/
|
||||||
15
README.md
15
README.md
@@ -47,11 +47,20 @@ Eine fertige `docker-compose.yml` liegt im Repository:
|
|||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Die Compose-Datei kann das Image bei Bedarf direkt aus dem lokalen Repository bauen:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose build
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
Oder manuell erstellen:
|
Oder manuell erstellen:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
vdo-ninja:
|
vdo-ninja:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
image: git.techniverse.net/scriptos/vdo-ninja:latest
|
image: git.techniverse.net/scriptos/vdo-ninja:latest
|
||||||
container_name: vdo-ninja
|
container_name: vdo-ninja
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -172,6 +181,12 @@ docker build \
|
|||||||
.
|
.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Das mit `docker build` erzeugte lokale Image kann anschließend auch per Compose gestartet werden:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
VDO_NINJA_IMAGE=vdo-ninja:v29.0 docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🛡️ Secrets & Variablen
|
## 🛡️ Secrets & Variablen
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
vdo-ninja:
|
vdo-ninja:
|
||||||
image: git.techniverse.net/scriptos/vdo-ninja:latest
|
build:
|
||||||
|
context: .
|
||||||
|
image: ${VDO_NINJA_IMAGE:-git.techniverse.net/scriptos/vdo-ninja:latest}
|
||||||
container_name: vdo-ninja
|
container_name: vdo-ninja
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user