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 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 }}
|
||||
|
||||
@@ -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."
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user