Compare commits

19 Commits

Author SHA1 Message Date
0759a04611 add upgrade packages to Dockerfile
All checks were successful
trivy-scan-image / trivy_image_scan (push) Successful in 22s
2026-02-04 23:10:30 +01:00
c1956db12b schedule for trivy_scan_image.yml
Some checks failed
trivy-scan-image / trivy_image_scan (push) Failing after 22s
2026-01-18 19:17:43 +01:00
7210a56a16 .gitea/workflows/create_and_push_multiarch_container.yml aktualisiert 2026-01-18 17:53:14 +01:00
024f11613e rework display-names for workflows 2026-01-17 16:22:54 +01:00
495f66fe2c build with nginx-unprivileged 2025-12-22 22:03:14 +01:00
e4eade177e imagescan_action 2025-12-13 22:42:15 +01:00
d42dc96178 imagescan_action 2025-12-13 22:31:34 +01:00
ed4bc37f68 imagescan_action 2025-12-13 22:31:16 +01:00
ac0ff6465e imagescan_action 2025-12-13 22:23:34 +01:00
e8b604914b imagescan_action 2025-12-13 22:02:40 +01:00
dd8bdf87a2 imagescan_action 2025-12-13 21:58:31 +01:00
2123eb3b7a imagescan_action 2025-12-13 21:52:47 +01:00
37160fc2b4 Dockerfile aktualisiert 2025-12-13 11:30:40 +01:00
2ba0b700fa Dockerfile aktualisiert
remove version label in dockerfile
2025-12-13 11:17:50 +01:00
f828aecd46 .gitea/workflows/create_and_push_multiarch_container.yml aktualisiert
change action
2025-12-13 11:17:02 +01:00
43d03958d1 .gitea/workflows/create_and_push_multiarch_container.yml aktualisiert 2025-02-16 16:30:45 +01:00
f879db7173 .gitea/workflows/create_and_push_multiarch_container.yml aktualisiert 2025-02-16 16:27:21 +01:00
14a6e2793a ci-action for container_build 2025-02-16 15:45:59 +01:00
71c59c62ef ci-action for container_build 2025-02-16 15:30:43 +01:00
4 changed files with 93 additions and 2 deletions

View File

@@ -0,0 +1,46 @@
name: build-image
run-name: build and push Docker-Image
on:
workflow_dispatch: # Manuelles Auslösen des Workflows
inputs:
image_tag:
description: 'Tag für das Docker-Image z.B. v1.0.0 (latest wird immer mit gebaut)'
required: true
default: '1.1.0'
env:
image_name: 404_games
registry: gitea.tebarius.duckdns.org
user: tebarius
jobs:
release-image:
runs-on: build-ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to Gitea
uses: docker/login-action@v2
with:
registry: ${{ env.registry }}
username: ${{ env.user }}
password: ${{ secrets.DOCKER_PULL_TOKEN }}
- name: Build and push
run: |
# Stelle sicher, dass Buildx aktiviert ist
docker buildx create --use
# Führe den Multiarch-Build aus und pushe das Image
docker buildx build \
--file ./Dockerfile \
--platform linux/amd64,linux/386,linux/arm64,linux/arm/v7 \
--tag ${{ env.registry }}/${{ env.user }}/${{ env.image_name }}:latest \
--tag ${{ env.registry }}/${{ env.user }}/${{ env.image_name }}:${{ github.event.inputs.image_tag }} \
--push ./

View File

@@ -0,0 +1,34 @@
name: trivy-scan-image
run-name: Trivy - Scan Docker Image
on:
workflow_dispatch: # Manuelles Auslösen des Workflows
inputs:
image_tag:
description: 'Tag für das zu scannende Docker-Image z.B. latest'
required: true
default: 'latest'
schedule:
- cron: '15 1 * * 5'
env:
image_name: 404_games
image_tag: ${{ github.event.inputs.image_tag || 'latest' }}
registry: gitea.tebarius.duckdns.org
user: tebarius
jobs:
trivy_image_scan:
runs-on: ubuntu-latest
container: aquasec/trivy:latest
steps:
- name: Scan image with trivy
run: |
trivy image \
--username ${{ env.user }} \
--password ${{ secrets.DOCKER_PULL_TOKEN }} \
--exit-code 1 \
--scanners vuln,misconfig,secret \
--severity HIGH,CRITICAL \
--ignore-unfixed \
${{ env.registry }}/${{ env.user }}/${{ env.image_name }}:${{ env.image_tag }}

View File

@@ -1,6 +1,9 @@
FROM nginx:stable-alpine-slim FROM nginxinc/nginx-unprivileged:stable-alpine-slim
LABEL authors="tebarius" LABEL authors="tebarius"
LABEL description="nginx_with_404_and_502_games" LABEL description="nginx_with_404_and_502_games"
USER root
RUN apk upgrade --no-cache
USER nginx
COPY ./games /usr/share/nginx/html COPY ./games /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

8
docker-compose.yml Normal file
View File

@@ -0,0 +1,8 @@
services:
404-dev:
image: nginxinc/nginx-unprivileged:stable-alpine-slim
volumes:
- ./games:/usr/share/nginx/html
restart: unless-stopped
ports:
- "8080:8080"