Skip to content

Commit b12bf20

Browse files
authored
Merge pull request #16755 from noone-silent/5.0.x-dockerfile
Small bug fixes for build and Dockerfile
2 parents 2b2a2fc + d910b3b commit b12bf20

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Diff for: .github/workflows/build-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
push: true
4848
file: docker/Dockerfile
4949
tags: |
50-
phalcon/cphalcon:${{ github.ref_name }}-php${{ matrix.php }}
50+
phalconphp/cphalcon:${{ github.ref_name }}-php${{ matrix.php }}
5151
ghcr.io/phalcon/cphalcon:${{ github.ref_name }}-php${{ matrix.php }}
5252
build-args: |
5353
PHP_VERSION=${{ matrix.php }}

Diff for: docker/Dockerfile

+14-9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ RUN set -eux \
2424
&& mkdir /app \
2525
&& chown "${USER}":"${GROUP}" /app \
2626
&& chmod 0770 /app \
27+
&& apt-get update \
28+
&& apt-get install -yq --no-install-recommends libfcgi-bin=2.* \
2729
# Install base extensions
2830
&& install-php-extensions \
2931
apcu \
@@ -58,6 +60,7 @@ RUN set -eux \
5860
https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck \
5961
&& chown "${USER}":"${GROUP}" /usr/local/bin/php-fpm-healthcheck \
6062
&& chmod 0770 /usr/local/bin/php-fpm-healthcheck \
63+
&& echo "pm.status_path = /status" >> /usr/local/etc/php-fpm.d/zz-docker.conf \
6164
# Set correct pid file location and permissions \
6265
&& mkdir -p /run/php \
6366
&& chown "${USER}":"${GROUP}" /run/php \
@@ -104,6 +107,8 @@ COPY ./ /srv
104107

105108
RUN set -eux \
106109
&& rm -rf /srv/vendor \
110+
# This is a cleanup for local tests and if a previous build has failed.
111+
&& find /srv -type f -iname '*.dep' -exec rm {} \;\
107112
&& composer global require phalcon/zephir:dev-development \
108113
&& /root/.composer/vendor/bin/zephir fullclean \
109114
&& /root/.composer/vendor/bin/zephir build \
@@ -113,20 +118,20 @@ FROM base AS prod
113118

114119
# This part builds the last step required for production image.
115120

116-
ARG PHALCON_VERSION=5.9.2
121+
ARG PHALCON_VERSION="v5.9.2"
117122

118123
ENV PATH=/app/bin:/app:${PATH} \
119124
PHP_VERSION=${PHP_VERSION} \
120125
PHALCON_VERSION=${PHALCON_VERSION}
121126

122-
LABEL org.opencontainer.image.title="Phalcon ${PHALCON_VERSION} with php ${PHP_VERSION}" \
123-
org.opencontainer.image.description="Docker image including Phalcon and PHP on Debian Bookworm" \
124-
org.opencontainer.image.authors="Phalcon Team <[email protected]>" \
125-
org.opencontainer.image.vendor="Phalcon PHP Framework" \
126-
org.opencontainer.image.licenses="BSD-3-Clause" \
127-
org.opencontainer.image.version="${PHALCON_VERSION}-php${PHP_VERSION}" \
128-
org.opencontainer.image.url="https://github.com/phalcon/cphalcon/" \
129-
org.opencontainer.image.source="https://github.com/phalcon/cphalcon/tree/${PHALCON_VERSION}/docker/Dockerfile"
127+
LABEL org.opencontainers.image.title="Phalcon ${PHALCON_VERSION} with php ${PHP_VERSION}" \
128+
org.opencontainers.image.description="Docker image including Phalcon and PHP on Debian Bookworm" \
129+
org.opencontainers.image.authors="Phalcon Team <[email protected]>" \
130+
org.opencontainers.image.vendor="Phalcon PHP Framework" \
131+
org.opencontainers.image.licenses="BSD-3-Clause" \
132+
org.opencontainers.image.version="${PHALCON_VERSION}-php${PHP_VERSION}" \
133+
org.opencontainers.image.url="https://github.com/phalcon/cphalcon/tree/${PHALCON_VERSION}/docker/Dockerfile" \
134+
org.opencontainers.image.source="https://github.com/phalcon/cphalcon/"
130135

131136
COPY --from=phalcon /srv/ext/modules/phalcon.so /tmp/phalcon.so
132137

0 commit comments

Comments
 (0)