Files

1.2 KiB

Projekt-Kontext: Docker Image Deployment

Dieses Projekt konzentriert sich auf das Erstellen und Pushen von Docker-Images in die private Registry gitea.rwcloud.ch unter Verwendung von Gitea Actions.

Infrastruktur & Tools

  • CI/CD: Gitea Actions
  • Registry: gitea.rwcloud.ch
  • User: build.user
  • Secret für Passwort: BUILDUSER_AUTHTOKEN

Workflow-Standards

Für Pipelines, die Docker-Images bauen und veröffentlichen, sollen folgende Aktionen verwendet werden:

1. Login in die Registry

- name: Login to Registry
  uses: docker/login-action@v3
  with:
    registry: gitea.rwcloud.ch
    username: build.user
    password: ${{ secrets.BUILDUSER_AUTHTOKEN }}

2. Build und Push

- name: Build and push Docker images
  uses: docker/build-push-action@v6.15.0
  with:
    push: true
    pull: true
    # Context und Dockerfile Pfad anpassen (z.B. ./code-server)
    context: . 
    # Tags entsprechend anpassen
    tags: gitea.rwcloud.ch/homelab/<image-name>:latest

Hinweise

  • Stelle sicher, dass push: true gesetzt ist, um das Image hochzuladen.
  • pull: true wird empfohlen, um Layer zu cachen/zu ziehen.
  • Pfade für context und dockerfile müssen relativ zum Repository-Root sein.