Compare commits

...

15 Commits

Author SHA1 Message Date
4c9d41c76c Remove fixed scan version.
All checks were successful
Build nginx fpm 8.2 image / Build-and-release-image (push) Successful in 1m37s
2025-11-07 07:34:40 +00:00
c08576b2dd Do not use latest alpine image.
Some checks failed
Build nginx fpm 8.2 image / Build-and-release-image (push) Failing after 1m10s
2025-05-14 06:07:22 +00:00
4feb0fc2f8 Use network mode host for build action.
All checks were successful
Build nginx fpm 8.2 image / Build-and-release-image (push) Successful in 1m1s
2025-05-06 09:39:40 +00:00
561841fba8 Use newer build push action.
All checks were successful
Build nginx fpm 8.2 image / Build-and-release-image (push) Successful in 1m12s
2025-04-29 07:58:57 +00:00
460d34325b Write serve path only once.
All checks were successful
Build nginx fpm 8.2 image / Build-and-release-image (push) Successful in 1m3s
2025-04-15 10:45:18 +02:00
3467ab8e9a .gitea/workflows/release.yml aktualisiert
All checks were successful
Build nginx fpm 8.2 image / Build-and-release-image (push) Successful in 1m0s
2025-04-01 13:02:13 +02:00
3c3530ff0f README.md aktualisiert 2025-04-01 13:00:09 +02:00
a4a0fd7732 Remove output of secrets in workflow. 2025-03-20 12:11:13 +01:00
37311011a4 Format workflow file. 2025-03-20 12:08:38 +01:00
99116297f1 Use correct secrets. 2025-03-20 12:05:42 +01:00
4bdf047fe2 .gitea/workflows/release.yml aktualisiert 2025-03-20 11:50:05 +01:00
79e93b1c85 Use gitea secrets. 2025-03-20 11:48:26 +01:00
5d843d5db0 Schedule run every week 2025-03-20 11:17:48 +01:00
79705b0e55 .gitea/workflows/release.yml aktualisiert 2025-03-20 08:20:46 +01:00
6e2d5fac8d .gitea/workflows/release.yml aktualisiert 2025-03-20 08:13:50 +01:00
4 changed files with 39 additions and 26 deletions

View File

@@ -1,15 +1,14 @@
name: Build nginx fpm image
name: Build nginx fpm 8.2 image
on:
push:
branches: [ master ]
schedule:
# Run every Sunday at midnight
- cron: '0 0 * * 0'
env:
# Use docker.io for Docker Hub if empty
USER: chris
PASS: q',\H(Od:G3).Xv<#!5P
IMAGE: /docker/nginx-fpm-8-2
jobs:
Build-and-release-image:
@@ -22,48 +21,62 @@ jobs:
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: '--allow-insecure-entitlement network.host'
driver-opts: network=host
- name: Log into registry
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: https://cs-git.ddnss.de
username: ${{ env.USER }}
password: ${{ env.PASS }}
username: ${{ vars.DOCKERHUB_USER }}
password: ${{ vars.DOCKERHUB_TOKEN }}
- name: Log into CS registry
uses: docker/login-action@v3
with:
registry: ${{ vars.CS_REGISTRY_URL }}
username: ${{ vars.CS_REGISTRY_USER }}
password: ${{ vars.CS_REGISTRY_PASS }}
- name: Log into local registry
uses: docker/login-action@v3
with:
registry: ${{ vars.LOCAL_REGISTRY_URL }}
username: ${{ vars.LOCAL_REGISTRY_USER }}
password: ${{ vars.LOCAL_REGISTRY_PASS }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: cs-git.ddnss.de/docker/nginx-fpm
images: ${{ secrets.REGISTRY_URL }}${{ env.IMAGE }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
tags: cs-git.ddnss.de/docker/nginx-fpm:latest
allow: network.host
network: host
tags: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
push: true
- name: Scan image
uses: anchore/scan-action@v6
id: scan
with:
image: "cs-git.ddnss.de/docker/nginx-fpm:latest"
image: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
fail-build: false
output-format: table
severity-cutoff: critical
registry-username: ${{ env.USER }}
registry-password: ${{ env.PASS }}
grype-version: 'v0.90.0'
registry-username: ${{ vars.LOCAL_REGISTRY_USER }}
registry-password: ${{ vars.LOCAL_REGISTRY_PASS }}
- name: Inspect file
run: cat ${{ steps.scan.outputs.table }}
- name: Write file
run: echo ${{ steps.scan.outputs.table }} >> result.txt
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: scan-result
path: result.txt
path: ${{ steps.scan.outputs.table }}

View File

@@ -1,4 +1,4 @@
FROM alpine:latest
FROM alpine:3.21
LABEL Maintainer="Christian Steinle <kontakt@steinle-computer.de>"
LABEL Description="Lightweight container with Nginx 1.22 & PHP 8.2 based on Alpine Linux."

View File

@@ -1,8 +1,8 @@
# Docker PHP-FPM & Nginx on Alpine Linux
# Docker PHP-FPM 8.2 & Nginx on Alpine Linux
* Built on the lightweight and secure Alpine Linux distribution
* Small image size
* PHP 8.1
* PHP 8.2
* Optimized for 100 concurrent users
* Optimized to only use resources when there's traffic (PHP-FPM's on-demand process manager)
* Using a non-privileged user to make it more secure

View File

@@ -2,6 +2,6 @@
set -e
sed -i "s|/var/www/html|/var/www/html${SERVE_PATH}|g" /etc/nginx/nginx.conf
sed -i "s|/var/www/html;|/var/www/html${SERVE_PATH};|g" /etc/nginx/nginx.conf
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf