Compare commits
15 Commits
cb5a0b7735
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c9d41c76c | |||
| c08576b2dd | |||
| 4feb0fc2f8 | |||
| 561841fba8 | |||
| 460d34325b | |||
| 3467ab8e9a | |||
| 3c3530ff0f | |||
| a4a0fd7732 | |||
| 37311011a4 | |||
| 99116297f1 | |||
| 4bdf047fe2 | |||
| 79e93b1c85 | |||
| 5d843d5db0 | |||
| 79705b0e55 | |||
| 6e2d5fac8d |
@@ -1,15 +1,14 @@
|
|||||||
|
name: Build nginx fpm 8.2 image
|
||||||
name: Build nginx fpm image
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
# Run every Sunday at midnight
|
||||||
|
- cron: '0 0 * * 0'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Use docker.io for Docker Hub if empty
|
IMAGE: /docker/nginx-fpm-8-2
|
||||||
USER: chris
|
|
||||||
PASS: q',\H(Od:G3).Xv<#!5P
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build-and-release-image:
|
Build-and-release-image:
|
||||||
@@ -22,48 +21,62 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
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
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: https://cs-git.ddnss.de
|
username: ${{ vars.DOCKERHUB_USER }}
|
||||||
username: ${{ env.USER }}
|
password: ${{ vars.DOCKERHUB_TOKEN }}
|
||||||
password: ${{ env.PASS }}
|
|
||||||
|
- 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
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: cs-git.ddnss.de/docker/nginx-fpm
|
images: ${{ secrets.REGISTRY_URL }}${{ env.IMAGE }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v6
|
||||||
env:
|
env:
|
||||||
ACTIONS_RUNTIME_TOKEN: ''
|
ACTIONS_RUNTIME_TOKEN: ''
|
||||||
with:
|
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
|
push: true
|
||||||
|
|
||||||
- name: Scan image
|
- name: Scan image
|
||||||
uses: anchore/scan-action@v6
|
uses: anchore/scan-action@v6
|
||||||
id: scan
|
id: scan
|
||||||
with:
|
with:
|
||||||
image: "cs-git.ddnss.de/docker/nginx-fpm:latest"
|
image: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
|
||||||
fail-build: false
|
fail-build: false
|
||||||
output-format: table
|
output-format: table
|
||||||
severity-cutoff: critical
|
severity-cutoff: critical
|
||||||
registry-username: ${{ env.USER }}
|
registry-username: ${{ vars.LOCAL_REGISTRY_USER }}
|
||||||
registry-password: ${{ env.PASS }}
|
registry-password: ${{ vars.LOCAL_REGISTRY_PASS }}
|
||||||
grype-version: 'v0.90.0'
|
|
||||||
|
|
||||||
- name: Inspect file
|
- name: Inspect file
|
||||||
run: cat ${{ steps.scan.outputs.table }}
|
run: cat ${{ steps.scan.outputs.table }}
|
||||||
|
|
||||||
- name: Write file
|
|
||||||
run: echo ${{ steps.scan.outputs.table }} >> result.txt
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: scan-result
|
name: scan-result
|
||||||
path: result.txt
|
path: ${{ steps.scan.outputs.table }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:3.21
|
||||||
LABEL Maintainer="Christian Steinle <kontakt@steinle-computer.de>"
|
LABEL Maintainer="Christian Steinle <kontakt@steinle-computer.de>"
|
||||||
LABEL Description="Lightweight container with Nginx 1.22 & PHP 8.2 based on Alpine Linux."
|
LABEL Description="Lightweight container with Nginx 1.22 & PHP 8.2 based on Alpine Linux."
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
* Built on the lightweight and secure Alpine Linux distribution
|
||||||
* Small image size
|
* Small image size
|
||||||
* PHP 8.1
|
* PHP 8.2
|
||||||
* Optimized for 100 concurrent users
|
* Optimized for 100 concurrent users
|
||||||
* Optimized to only use resources when there's traffic (PHP-FPM's on-demand process manager)
|
* 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
|
* Using a non-privileged user to make it more secure
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
set -e
|
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
|
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user