-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
4 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,34 @@ | ||
FROM php:7.4-fpm | ||
|
||
ARG NPM_UID=1000 | ||
ARG NPM_GID=1000 | ||
|
||
# Yank the node and npm binaries from the official Node docker container | ||
COPY --from=node:16-slim /usr/local/bin /usr/local/bin | ||
COPY --from=node:16-slim /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
python \ | ||
zip \ | ||
libpng-dev \ | ||
&& docker-php-ext-install pdo_mysql exif gd \ | ||
## APCu | ||
&& pecl install xdebug-3.1.6 \ | ||
&& pecl install apcu \ | ||
&& pecl install apcu_bc-1.0.3 \ | ||
&& docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \ | ||
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini | ||
|
||
# Composer | ||
COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer | ||
|
||
# Fix npm | ||
RUN mkdir /.npm && chown -R "${NPM_UID}:${NPM_GID}" "/.npm" | ||
RUN mkdir /.config && chown -R "${NPM_UID}:${NPM_GID}" "/.config" | ||
|
||
# Cleanup | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
WORKDIR /var/www |