legacy: Switch to frugan/php-legacy base image, drop www-data setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kacper Donat 2026-11-06 22:39:33 +01:00
parent 87ca7726cc
commit 51c56d417e
3 changed files with 33 additions and 31 deletions

View File

@ -1,9 +1,9 @@
FROM php:{{ version }}-fpm-alpine FROM frugan/php-legacy:{{ version }}-fpm
LABEL maintainer="Kacper Donat <kacper@kadet.net>" LABEL maintainer="Kacper Donat <kacper@kadet.net>"
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ # frugan/php-legacy ships all extensions prebuilt, they only need to be enabled
RUN install-php-extensions {{ php_extensions|join(" ") }} RUN docker-php-ext-enable {{ php_extensions|join(" ") }}
RUN apk update && apk add acl RUN apt-get update && apt-get install -y --no-install-recommends acl && rm -rf /var/lib/apt/lists/*
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

View File

@ -1,30 +1,30 @@
--- ---
- name: Create www-data user for ssh access for legacy services # - name: Create www-data user for ssh access for legacy services
user: # user:
name: www-data # name: www-data
group: www-data # group: www-data
shell: /bin/bash # shell: /bin/bash
system: yes # system: yes
password: '!' # password: '!'
state: present # state: present
register: www_user # register: www_user
tags: # tags:
- setup # - setup
- name: Add users to www-data group # - name: Add users to www-data group
user: # user:
user: "{{ user }}" # user: "{{ user }}"
groups: www-data # groups: www-data
append: yes # append: yes
loop: "{{ www_data_users }}" # loop: "{{ www_data_users }}"
loop_control: # loop_control:
loop_var: user # loop_var: user
- name: Ensure WWW root exists for legacy services # - name: Ensure WWW root exists for legacy services
file: # file:
path: "{{ www_root }}" # path: "{{ www_root }}"
state: directory # state: directory
owner: "{{ www_user.uid }}" # owner: "{{ www_user.uid }}"
group: "{{ www_user.group }}" # group: "{{ www_user.group }}"
mode: g+rw # mode: g+rw

View File

@ -6,6 +6,8 @@ php_versions: ['7.1', '7.3']
php_extensions: php_extensions:
- bcmath - bcmath
- gd - gd
- igbinary # required by redis
- msgpack # required by redis
- opcache - opcache
- pdo_mysql - pdo_mysql
- redis - redis