Skip to content

Commit

Permalink
Added PHP version and image version to container info start up
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Nov 7, 2024
1 parent b8a9bb1 commit 943a2a1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/etc/entrypoint.d/0-container-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Docker user: $(whoami)
Docker uid: $(id -u)
Docker gid: $(id -g)
OPcache: $PHP_OPCACHE_MESSAGE
PHP Version: $(php -r 'echo phpversion();')
Image Version: $(cat /etc/serversideup-php-version)
"

if [ "$PHP_OPCACHE_STATUS" = "0" ]; then
Expand Down
3 changes: 3 additions & 0 deletions src/variations/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ RUN docker-php-serversideup-dep-install-alpine "${DEPENDENCY_PACKAGES_ALPINE}" &
chown -R www-data:www-data /var/www && \
chmod -R 755 /var/www && \
\
# Set the image version
echo "${REPOSITORY_BUILD_VERSION}" > /etc/serversideup-php-version && \
\
# Make composer cache directory
mkdir -p "${COMPOSER_HOME}" && \
chown -R www-data:www-data "${COMPOSER_HOME}" && \
Expand Down
3 changes: 3 additions & 0 deletions src/variations/fpm-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ RUN docker-php-serversideup-dep-install-debian "${DEPENDENCY_PACKAGES_DEBIAN}"
chown -R www-data:www-data /var/www && \
chmod -R 755 /var/www && \
\
# Set the image version
echo "${REPOSITORY_BUILD_VERSION}" > /etc/serversideup-php-version && \
\
# Make composer cache directory
mkdir -p "${COMPOSER_HOME}" && \
chown -R www-data:www-data "${COMPOSER_HOME}" && \
Expand Down
3 changes: 3 additions & 0 deletions src/variations/fpm-nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ RUN docker-php-serversideup-dep-install-alpine "${DEPENDENCY_PACKAGES_ALPINE}" &
chown -R www-data:www-data /var/www && \
chmod -R 755 /var/www && \
\
# Set the image version
echo "${REPOSITORY_BUILD_VERSION}" > /etc/serversideup-php-version && \
\
# Make composer cache directory
mkdir -p "${COMPOSER_HOME}" && \
chown -R www-data:www-data "${COMPOSER_HOME}" && \
Expand Down
3 changes: 3 additions & 0 deletions src/variations/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ RUN rm -rf /usr/local/etc/php-fpm.d/*.conf && \
chown -R www-data:www-data /var/www && \
chmod -R 755 /var/www && \
\
# Set the image version
echo "${REPOSITORY_BUILD_VERSION}" > /etc/serversideup-php-version && \
\
# Make composer cache directory
mkdir -p "${COMPOSER_HOME}" && \
chown -R www-data:www-data "${COMPOSER_HOME}" && \
Expand Down

0 comments on commit 943a2a1

Please sign in to comment.