Compare commits
12 Commits
21c49eba5e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b339b1e4e6 | |||
| 2253f60dfa | |||
| 685b133ad3 | |||
| 5359098d32 | |||
| 66c4fd8078 | |||
| fcbce1f22b | |||
| abc128b86f | |||
| 3053849a2e | |||
| d0fb6396e4 | |||
| 2c819bede7 | |||
| 008fa2427b | |||
| 9c6c871dc7 |
@@ -1,15 +1,14 @@
|
||||
name: Build startup image
|
||||
name: Build php apache 8.4 image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
# Run every Sunday at midnight
|
||||
- cron: '1 0 * * 0'
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
REGISTRY: cs-registry.ddnss.de
|
||||
USER: chris
|
||||
PASS: q',\H(Od:G3).Xv<#!5P
|
||||
|
||||
IMAGE: /docker/php-apache-8-4
|
||||
|
||||
jobs:
|
||||
Build-and-release-image:
|
||||
@@ -22,26 +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/php-apache-8-3
|
||||
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/php-apache-8-3
|
||||
allow: network.host
|
||||
network: host
|
||||
tags: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
|
||||
push: true
|
||||
# cache-from: type=gha
|
||||
# cache-to: type=gha,mode=max
|
||||
|
||||
- name: Scan image
|
||||
uses: anchore/scan-action@v6
|
||||
id: scan
|
||||
with:
|
||||
image: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
|
||||
fail-build: false
|
||||
output-format: table
|
||||
severity-cutoff: critical
|
||||
registry-username: ${{ vars.LOCAL_REGISTRY_USER }}
|
||||
registry-password: ${{ vars.LOCAL_REGISTRY_PASS }}
|
||||
|
||||
- name: Inspect file
|
||||
run: cat ${{ steps.scan.outputs.table }}
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: scan-result
|
||||
path: ${{ steps.scan.outputs.table }}
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -1,11 +1,14 @@
|
||||
FROM debian:12-slim
|
||||
FROM php:8.4-apache
|
||||
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y upgrade && \
|
||||
apt-get -y install libicu-dev libgd-dev libonig-dev unzip
|
||||
apt-get -y install libicu-dev libgd-dev libonig-dev unzip libpq-dev libzip-dev libxml2-dev libldb-dev libldap2-dev libmemcached-dev
|
||||
|
||||
RUN docker-php-ext-install gd intl mbstring mysqli pdo_mysql
|
||||
RUN docker-php-ext-install gd intl mbstring mysqli pdo pdo_pgsql pdo_mysql zip bcmath soap ldap
|
||||
RUN pecl install msgpack igbinary redis
|
||||
RUN docker-php-ext-enable msgpack igbinary redis
|
||||
RUN pecl install memcached pcov
|
||||
RUN docker-php-ext-enable memcached pcov
|
||||
|
||||
RUN apt-get -y purge --auto-remove && apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user