Skip to content

Commit 0046040

Browse files
Set PHP memory_limit to 128M, allow to override. (#16)
Make php.ini use the PHP_MEMORY_LIMIT env variable (with default value of 128M).
1 parent 9f503aa commit 0046040

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ LABEL maintainer="marji@morpht.com"
66
LABEL org.opencontainers.image.source="https://github.com/morpht/ci-php"
77

88
ENV COMPOSER_VERSION=2.6.6 \
9-
COMPOSER_HASH_SHA256=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314
9+
COMPOSER_HASH_SHA256=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314 \
10+
PHP_MEMORY_LIMIT=128M
1011

1112
RUN apk add --no-cache --update git \
1213
bash \
@@ -20,7 +21,8 @@ RUN apk add --no-cache --update git \
2021
&& rm -rf /var/cache/apk/* \
2122
&& curl -L -o /usr/local/bin/composer https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \
2223
&& echo "$COMPOSER_HASH_SHA256 /usr/local/bin/composer" | sha256sum -c \
23-
&& chmod +x /usr/local/bin/composer
24+
&& chmod +x /usr/local/bin/composer \
25+
&& echo 'memory_limit = ${PHP_MEMORY_LIMIT}' > /usr/local/etc/php/conf.d/memory-limit.ini
2426

2527
RUN adduser -D -h /home/runner -u $RUNNER_UID runner
2628

0 commit comments

Comments
 (0)