Skip to content

Commit 7e0a3bd

Browse files
committed
Ajout de la prise en charge du référentiel de base pour les images Docker et création d'un nouveau Dockerfile pour Sail.
1 parent 57fbf80 commit 7e0a3bd

4 files changed

Lines changed: 56 additions & 1 deletion

File tree

.github/workflows/action_publish-images-dev-main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
needs: build-dev-images
1717
uses: ./.github/workflows/service_docker-build-and-publish.yml
1818
with:
19+
base-repository: "ghcr.io/yieldstudio/php-dev" # Use the dev base images
1920
registry-repositories: "ghcr.io/yieldstudio/sail-dev" # Set to our development repository
2021
tag-prefix: ''
2122
php-versions-config: 'scripts/conf/sail-versions-base-config.yml'

.github/workflows/service_docker-build-and-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ on:
3535
type: boolean
3636
default: true
3737
description: 'Whether to push the images to the registry.'
38+
base-repository:
39+
type: string
40+
default: 'php'
41+
description: 'The base repository to use for the Docker images.'
3842
ref:
3943
type: string
4044
default: ${{ github.ref }}
@@ -166,6 +170,7 @@ jobs:
166170
cache-from: type=gha
167171
cache-to: type=gha
168172
build-args: |
173+
BASE_REPO=${{ inputs.base-repository }}
169174
BASE_OS_VERSION=${{ matrix.base_os }}
170175
PHP_VERSION=${{ matrix.patch_version }}
171176
PHP_VARIATION=${{ matrix.php_variation }}

src/variations/frankenphp/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# check=skip=SecretsUsedInArgOrEnv
22
ARG BASE_OS_VERSION='trixie'
33
ARG PHP_VERSION='8.4'
4-
ARG BASE_IMAGE="php:${PHP_VERSION}-zts-${BASE_OS_VERSION}"
4+
ARG BASE_REPO='php'
5+
ARG BASE_IMAGE="${BASE_REPO}:${PHP_VERSION}-zts-${BASE_OS_VERSION}"
56
ARG FRANKENPHP_VERSION='1.9.1'
67
ARG GOLANG_VERSION='1.25'
78

src/variations/sail/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# check=skip=SecretsUsedInArgOrEnv
2+
ARG BASE_OS_VERSION='trixie'
3+
ARG PHP_VERSION='8.4'
4+
ARG BASE_REPO='ghcr.io/yieldstudio/php-dev'
5+
ARG BASE_IMAGE="${BASE_REPO}:${PHP_VERSION}-frankenphp-${BASE_OS_VERSION}"
6+
ARG SOPS_VERSION="v3.10.2"
7+
ARG NODE_VERSION=24
8+
ARG MYSQL_CLIENT="mysql-client"
9+
ARG POSTGRES_VERSION=18
10+
11+
########################
12+
# Common
13+
########################
14+
FROM ${BASE_IMAGE} AS common
15+
16+
ENV AUTORUN_ENABLED=false \
17+
PHP_OPCACHE_ENABLE=0 \
18+
XDEBUG_MODE="coverage,debug" \
19+
XDEBUG_CONFIG="client_host=host.docker.internal client_port=9003" \
20+
SOPS_AGE_KEY_FILE="${APP_BASE_DIR}/.age-key"
21+
22+
USER root
23+
24+
RUN apt-get update && apt-get upgrade -y \
25+
&& mkdir -p /etc/apt/keyrings \
26+
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python3 dnsutils librsvg2-bin fswatch ffmpeg nano age \
27+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
28+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
29+
&& apt-get update \
30+
&& apt-get install -y nodejs \
31+
&& npm install -g npm \
32+
&& npm install -g pnpm \
33+
&& npm install -g bun \
34+
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \
35+
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
36+
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
37+
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$VERSION_CODENAME")-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
38+
&& apt-get update \
39+
&& apt-get install -y yarn \
40+
&& apt-get -y autoremove \
41+
&& apt-get clean \
42+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
43+
&& curl -Lo /usr/local/bin/sops https://github.com/getsops/sops/releases/download/$SOPS_VERSION/sops-$SOPS_VERSION.linux.amd64 \
44+
&& chmod +x /usr/local/bin/sops
45+
46+
RUN install-php-extensions xdebug
47+
48+
USER www-data

0 commit comments

Comments
 (0)