-
Notifications
You must be signed in to change notification settings - Fork 1
rootless roadrunner php #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5958c2c
rootless php
USA-RedDragon f1d2cbb
strip rootful targets, nginx, and php-fpm in favor of roadrunner
USA-RedDragon e6918e2
ci: make only rootless images
USA-RedDragon 516f2c6
chore(scripts): be a bit more pedantic
USA-RedDragon ff0459b
restore fpm rootfs
USA-RedDragon a53d260
restore fpm dockerfile
USA-RedDragon 84f02c2
dockerfile: fpm remove ext-sockets from default
USA-RedDragon e08f4bb
ci: build both servers
USA-RedDragon 4c07787
ci: label build with server
USA-RedDragon 809b4ed
ci: ensure image tags for FPM are unchanged
USA-RedDragon 4024297
docker: rr: add sockets extension to PHP installation
USA-RedDragon 4202ae7
docker: rr: remove s6
USA-RedDragon e6c29d8
README: restore FPM/nginx sections
USA-RedDragon 87a3669
readme: document new image variant
USA-RedDragon 5e658c2
clevyr-build: re-add nginx templating
USA-RedDragon 208f361
chore: deduplicate build script
gabe565 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,104 @@ | ||
| #syntax=docker/dockerfile:1 | ||
|
|
||
| ARG PHP_VERSION | ||
| ARG COMPOSER_VERSION | ||
| ARG ALPINE_VERSION | ||
|
|
||
| FROM composer:$COMPOSER_VERSION AS local-composer | ||
|
|
||
| FROM php:$PHP_VERSION-cli-alpine$ALPINE_VERSION AS base | ||
|
|
||
| COPY --from=mlocati/php-extension-installer:2.10.6 /usr/bin/install-php-extensions /usr/bin/ | ||
|
|
||
| RUN <<EOT | ||
| set -eux | ||
| apk add --no-cache bash git jq postgresql-client | ||
| install-php-extensions bcmath calendar exif intl pcntl opcache pgsql pdo_pgsql redis sockets zip | ||
| cd "$PHP_INI_DIR" | ||
| sed -ri \ | ||
| -e 's/^;?(max_execution_time).*/\1 = ${PHP_MAX_EXECUTION_TIME}/' \ | ||
| -e 's/^;?(max_input_vars).*/\1 = ${PHP_MAX_INPUT_VARS}/' \ | ||
| -e 's/^;?(memory_limit).*/\1 = ${PHP_MEMORY_LIMIT}/' \ | ||
| -e 's/^;?(post_max_size).*/\1 = ${PHP_POST_MAX_SIZE}/' \ | ||
| -e 's/^;?(upload_max_filesize).*/\1 = ${PHP_UPLOAD_MAX_FILESIZE}/' \ | ||
| -e 's/^;?(max_file_uploads).*/\1 = ${PHP_MAX_FILE_UPLOADS}/' \ | ||
| -e 's/^;?(expose_php).*/\1 = Off/' \ | ||
| php.ini-production | ||
| ln -s php.ini-production php.ini | ||
| EOT | ||
|
|
||
| ENV LC_ALL=C | ||
|
|
||
| ARG PHP_MAX_EXECUTION_TIME=30 | ||
| ENV PHP_MAX_EXECUTION_TIME=$PHP_MAX_EXECUTION_TIME | ||
| ARG PHP_MAX_INPUT_VARS=1000 | ||
| ENV PHP_MAX_INPUT_VARS=$PHP_MAX_INPUT_VARS | ||
| ARG PHP_MEMORY_LIMIT=256M | ||
| ENV PHP_MEMORY_LIMIT=$PHP_MEMORY_LIMIT | ||
| ARG PHP_POST_MAX_SIZE=32M | ||
| ENV PHP_POST_MAX_SIZE=$PHP_POST_MAX_SIZE | ||
| ARG PHP_UPLOAD_MAX_FILESIZE=8M | ||
| ENV PHP_UPLOAD_MAX_FILESIZE=$PHP_UPLOAD_MAX_FILESIZE | ||
| ARG PHP_MAX_FILE_UPLOADS=20 | ||
| ENV PHP_MAX_FILE_UPLOADS=$PHP_MAX_FILE_UPLOADS | ||
|
|
||
| ARG COMPOSER_MEMORY_LIMIT=-1 | ||
| ENV COMPOSER_MEMORY_LIMIT=$COMPOSER_MEMORY_LIMIT | ||
|
|
||
| ARG COMPOSER_VERSION | ||
| COPY --from=local-composer /usr/bin/composer /usr/bin/composer | ||
| RUN <<EOT | ||
| set -eux | ||
| if [ "$COMPOSER_VERSION" = "1" ]; then | ||
| composer global require hirak/prestissimo | ||
| composer clear-cache | ||
| fi | ||
| EOT | ||
|
|
||
| COPY --from=ghcr.io/roadrunner-server/roadrunner:2025.1.11 /usr/bin/rr /usr/local/bin/rr | ||
| COPY rootfs.common/ / | ||
| COPY rootfs.rr/ / | ||
|
|
||
| USER nobody:nogroup | ||
| WORKDIR /app | ||
|
|
||
| FROM base AS onbuild | ||
|
|
||
| ONBUILD ARG PHP_MAX_EXECUTION_TIME | ||
| ONBUILD ENV PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-30} | ||
| ONBUILD ARG PHP_MAX_INPUT_VARS | ||
| ONBUILD ENV PHP_MAX_INPUT_VARS=${PHP_MAX_INPUT_VARS:-1000} | ||
| ONBUILD ARG PHP_MEMORY_LIMIT | ||
| ONBUILD ENV PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-256M} | ||
| ONBUILD ARG PHP_POST_MAX_SIZE | ||
| ONBUILD ENV PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-32M} | ||
| ONBUILD ARG PHP_UPLOAD_MAX_FILESIZE | ||
| ONBUILD ENV PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-8M} | ||
| ONBUILD ARG PHP_MAX_FILE_UPLOADS | ||
| ONBUILD ENV PHP_MAX_FILE_UPLOADS=${PHP_MAX_FILE_UPLOADS:-20} | ||
|
|
||
| ONBUILD ARG SKIP_BUILD | ||
| ONBUILD ARG DEPS | ||
| ONBUILD ARG INSTALL | ||
|
|
||
| ONBUILD ARG INSTALL_GD | ||
| ONBUILD ARG INSTALL_IMAGICK | ||
| ONBUILD ARG INSTALL_MOSQUITTO | ||
| ONBUILD ARG INSTALL_MYSQL | ||
| ONBUILD ARG INSTALL_SQLSRV | ||
| ONBUILD ARG INSTALL_XDEBUG | ||
|
|
||
| ONBUILD ARG COMPOSER_VERSION | ||
|
|
||
| ONBUILD ARG IPE_GD_WITHOUTAVIF=1 | ||
|
|
||
| ONBUILD USER root | ||
|
|
||
| ONBUILD RUN <<EOT | ||
| set -eux | ||
| if [ "${SKIP_BUILD:-}" != "true" ]; then | ||
| clevyr-build | ||
| fi | ||
| EOT | ||
|
|
||
| ONBUILD USER nobody:nogroup | ||
This file contains hidden or 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 hidden or 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
File renamed without changes.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -e | ||
| set -efu | ||
|
|
||
| cd /app | ||
| exec php-fpm |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,14 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -efu | ||
|
|
||
| HEALTH_CHECK_IP="${1:-127.0.0.1}" | ||
| HEALTH_CHECK_PORT="${2:-9000}" | ||
|
|
||
| env -i REDIRECT_STATUS=true \ | ||
| SCRIPT_NAME=/ping \ | ||
| SCRIPT_FILENAME=/ping \ | ||
| REQUEST_METHOD=GET \ | ||
| cgi-fcgi -bind -connect \ | ||
| "${HEALTH_CHECK_IP}:${HEALTH_CHECK_PORT}" \ | ||
| | grep -e pong >/dev/null |
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,8 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -efu | ||
|
|
||
| HEALTH_CHECK_HOST="${1:-127.0.0.1}" | ||
| HEALTH_CHECK_PORT="${2:-2114}" | ||
|
|
||
| wget -qO /dev/null "http://${HEALTH_CHECK_HOST}:${HEALTH_CHECK_PORT}/health?plugin=http" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
laravel/octaneneedsspiral/roadrunner-cliandspiral/roadrunner-httpwhich one or both depend on ext-sockets