Skip to content

Commit ef49616

Browse files
committed
initial commit
0 parents  commit ef49616

File tree

4 files changed

+129
-0
lines changed

4 files changed

+129
-0
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build
2+
on:
3+
schedule:
4+
- cron: '5 0 * * *'
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- Dockerfile.php
11+
12+
env:
13+
DOCKER_BUILDKIT: 1
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
id-token: write
19+
20+
jobs:
21+
php:
22+
name: "${{ matrix.version }}"
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
version:
27+
- 8.1
28+
- 8.2
29+
- 8.3
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
- name: Login into Github Docker Registery
35+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
36+
37+
- name: Install and configure Namespace CLI
38+
uses: namespacelabs/nscloud-setup@v0
39+
40+
- name: Configure Namespace powered Buildx
41+
uses: namespacelabs/nscloud-setup-buildx-action@v0
42+
43+
- uses: docker/build-push-action@v5
44+
with:
45+
tags: ghcr.io/friendsofshopware/devcontainer:base-${{ matrix.version }}
46+
platforms: linux/amd64,linux/arm64
47+
build-args: |
48+
PHP_VERSION=${{ matrix.version }}
49+
push: true
50+
provenance: false

Dockerfile.php

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
ARG PHP_VERSION=8.3
2+
3+
FROM ghcr.io/shyim/wolfi-php/nginx:${PHP_VERSION}
4+
5+
ARG PHP_VERSION=8.3
6+
7+
ENV DATABASE_URL=mysql://root:root@localhost/shopware \
8+
LOCK_DSN=flock \
9+
PHP_MEMORY_LIMIT=512M \
10+
COMPOSER_ROOT_VERSION=1.0.0 \
11+
APP_URL=http://localhost:8000 \
12+
NPM_CONFIG_ENGINE_STRICT=false
13+
14+
RUN <<EOF
15+
set -e
16+
17+
apk add --no-cache \
18+
libstdc++ \
19+
bash \
20+
valkey \
21+
valkey-cli \
22+
curl \
23+
nodejs-22 \
24+
npm \
25+
git \
26+
composer \
27+
php-${PHP_VERSION} \
28+
php-${PHP_VERSION}-fileinfo \
29+
php-${PHP_VERSION}-openssl \
30+
php-${PHP_VERSION}-ctype \
31+
php-${PHP_VERSION}-curl \
32+
php-${PHP_VERSION}-xml \
33+
php-${PHP_VERSION}-dom \
34+
php-${PHP_VERSION}-phar \
35+
php-${PHP_VERSION}-simplexml \
36+
php-${PHP_VERSION}-xmlreader \
37+
php-${PHP_VERSION}-xmlwriter \
38+
php-${PHP_VERSION}-bcmath \
39+
php-${PHP_VERSION}-iconv \
40+
php-${PHP_VERSION}-mbstring \
41+
php-${PHP_VERSION}-gd \
42+
php-${PHP_VERSION}-intl \
43+
php-${PHP_VERSION}-pdo \
44+
php-${PHP_VERSION}-pdo_mysql \
45+
php-${PHP_VERSION}-mysqlnd \
46+
php-${PHP_VERSION}-pcntl \
47+
php-${PHP_VERSION}-sockets \
48+
php-${PHP_VERSION}-bz2 \
49+
php-${PHP_VERSION}-gmp \
50+
php-${PHP_VERSION}-soap \
51+
php-${PHP_VERSION}-zip \
52+
php-${PHP_VERSION}-sodium \
53+
php-${PHP_VERSION}-opcache \
54+
php-${PHP_VERSION}-zstd \
55+
php-${PHP_VERSION}-redis \
56+
php-${PHP_VERSION}-imagick \
57+
openssl-config \
58+
mariadb-11.2 \
59+
jq
60+
61+
mkdir -p /var/tmp /run/mysqld
62+
mariadb-install-db --datadir=/var/lib/mariadb --user=root
63+
/usr/bin/mariadbd --basedir=/usr --datadir=/var/lib/mariadb --plugin-dir=/usr/lib/mariadb/plugin --user=root &
64+
sleep 2
65+
mariadb-admin --user=root password 'root'
66+
chown -R www-data:www-data /var/www/html /var/lib/mariadb/ /var/tmp /run/mysqld/
67+
68+
ldconfig
69+
EOF
70+
71+
COPY rootfs /
72+
73+
USER www-data

rootfs/etc/Procfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nginx: /usr/sbin/nginx
2+
php-fpm: /usr/sbin/php-fpm
3+
mysql: /usr/bin/mariadbd --basedir=/usr --datadir=/var/lib/mariadb --plugin-dir=/usr/lib/mariadb/plugin --user=www-data
4+
valkey: /usr/bin/valkey-server --dir /tmp/valkey.rdb

rootfs/etc/php/conf.d/mysql-fix.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pdo_mysql.default_socket=/run/mysqld/mysqld.sock
2+
mysqli.default_socket=/run/mysqld/mysqld.sock

0 commit comments

Comments
 (0)