-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from duboiss/featjre
- Loading branch information
Showing
6 changed files
with
195 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: "Publish to Docker Hub (8.3)" | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
paths: | ||
- ".github/workflows/publish_83.yml" | ||
- "8.3/**" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Prepare the build context" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Set up QEMU" | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: "Set up Docker Buildx" | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: "Log in to DockerHub" | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: "Build & Publish the Docker image (default)" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./8.3/ | ||
tags: ajardin/php:8."" | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
cache-from: type=registry,ref=ajardin/php:8.3 | ||
cache-to: type=inline | ||
|
||
- name: "Build & Publish the Docker image (Blackfire)" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./8.3/blackfire/ | ||
tags: ajardin/php:8.3-blackfire | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
cache-from: type=registry,ref=ajardin/php:8.3-blackfire | ||
cache-to: type=inline | ||
|
||
- name: "Build & Publish the Docker image (Xdebug)" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./8.3/xdebug/ | ||
tags: ajardin/php:8.3-xdebug | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
cache-from: type=registry,ref=ajardin/php:8.3-xdebug | ||
cache-to: type=inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
FROM php:8.3-fpm | ||
|
||
LABEL org.opencontainers.image.authors="Alexandre Jardin <[email protected]>" | ||
LABEL org.opencontainers.image.title="Custom PHP 8.3 image for an application supported by Origami." | ||
LABEL org.opencontainers.image.description="https://github.com/origamiphp/docker-images/blob/main/php/README.md" | ||
LABEL org.opencontainers.image.source="https://github.com/origamiphp/docker-images/blob/main/php/8.3/Dockerfile" | ||
|
||
# Installs the system requirements | ||
RUN \ | ||
apt update && \ | ||
apt install -y --no-install-recommends \ | ||
git \ | ||
jq \ | ||
libc-client-dev \ | ||
libfreetype-dev \ | ||
libicu-dev \ | ||
libkrb5-dev \ | ||
libjpeg-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
libssh2-1-dev \ | ||
libtidy-dev \ | ||
libwebp-dev \ | ||
libxml2-dev \ | ||
libxml2-utils \ | ||
libxslt-dev \ | ||
libzip-dev \ | ||
nano \ | ||
procps \ | ||
ssh-client \ | ||
ssmtp \ | ||
unzip | ||
|
||
# Installs the PHP extensions | ||
RUN \ | ||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ | ||
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \ | ||
docker-php-ext-install -j$(nproc) \ | ||
bcmath \ | ||
exif \ | ||
imap \ | ||
intl \ | ||
gd \ | ||
opcache \ | ||
pcntl \ | ||
pdo_mysql \ | ||
pdo_pgsql \ | ||
soap \ | ||
sockets \ | ||
tidy \ | ||
xsl \ | ||
zip && \ | ||
yes "" | pecl install apcu redis ssh2-beta && \ | ||
docker-php-ext-enable apcu redis ssh2 && \ | ||
perl -pi -e "s|;pm.status_path = /status|pm.status_path = /php_fpm_status|g" /usr/local/etc/php-fpm.d/www.conf && \ | ||
perl -pi -e "s/mailhub=mail/mailhub=maildev/" /etc/ssmtp/ssmtp.conf | ||
|
||
# Installs the JavaScript dependencies | ||
RUN \ | ||
curl -fsSL https://deb.nodesource.com/setup_17.x | bash - && \ | ||
apt install -y --no-install-recommends nodejs && \ | ||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | ||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ | ||
apt update && \ | ||
apt install -y --no-install-recommends yarn && \ | ||
yarn global add grunt-cli gulp | ||
|
||
# Assigns a new UID/GID to avoid using a generated value | ||
RUN \ | ||
usermod -u 1000 www-data && \ | ||
groupmod -g 1000 www-data | ||
|
||
# Give www-data permissions to its home folder | ||
RUN chown www-data:www-data /var/www | ||
|
||
# Installs the "netz98/n98-magerun2" package | ||
RUN \ | ||
curl -sS https://files.magerun.net/n98-magerun2.phar --output /usr/local/bin/magerun2 && \ | ||
chmod +x /usr/local/bin/magerun2 | ||
|
||
# Installs Composer globally and configures it | ||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
ENV COMPOSER_MEMORY_LIMIT -1 | ||
ENV COMPOSER_HOME /.composer | ||
ENV COMPOSER_CACHE_DIR /.composer/cache | ||
|
||
# Installs the custom entrypoint | ||
COPY --from=ajardin/php-entrypoint:latest /usr/local/bin/docker-custom-entrypoint /usr/local/bin/docker-custom-entrypoint | ||
RUN chmod 777 /usr/local/bin/docker-custom-entrypoint | ||
CMD ["php-fpm"] | ||
ENTRYPOINT ["docker-custom-entrypoint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM ajardin/php:8.3 | ||
|
||
LABEL org.opencontainers.image.authors="Alexandre Jardin <[email protected]>" | ||
LABEL org.opencontainers.image.title="Custom PHP 8.3 image with Blackfire for an application supported by Origami." | ||
LABEL org.opencontainers.image.description="https://github.com/origamiphp/docker-images/blob/main/php/README.md" | ||
LABEL org.opencontainers.image.source="https://github.com/origamiphp/docker-images/blob/main/php/8.3/blackfire/Dockerfile" | ||
|
||
# Installs the Blackfire PHP probe | ||
RUN \ | ||
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") && \ | ||
architecture=$(case $(uname -m) in i386 | i686 | x86) echo "i386" ;; x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) && \ | ||
curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s "https://blackfire.io/api/v1/releases/probe/php/linux/${architecture}/${version}" && \ | ||
mkdir -p /tmp/blackfire && \ | ||
tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire && \ | ||
mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so && \ | ||
chown root:root $(php -r "echo ini_get ('extension_dir');")/blackfire.so && \ | ||
chmod 755 $(php -r "echo ini_get ('extension_dir');")/blackfire.so && \ | ||
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz && \ | ||
docker-php-ext-enable blackfire |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ajardin/php:8.3 | ||
|
||
LABEL org.opencontainers.image.authors="Alexandre Jardin <[email protected]>" | ||
LABEL org.opencontainers.image.title="Custom PHP 8.3 image with Xdebug for an application supported by Origami." | ||
LABEL org.opencontainers.image.description="https://github.com/origamiphp/docker-images/blob/main/php/README.md" | ||
LABEL org.opencontainers.image.source="https://github.com/origamiphp/docker-images/blob/main/php/8.3/xdebug/Dockerfile" | ||
|
||
# Installs the Xdebug extension | ||
RUN \ | ||
yes "" | pecl install xdebug && \ | ||
docker-php-ext-enable xdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters