Skip to content

Commit

Permalink
Bump Node to version 16
Browse files Browse the repository at this point in the history
  • Loading branch information
MKodde committed Jun 13, 2023
1 parent ec35e82 commit 2aee79d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docker/php-build-eb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ ARG NPM_UID=1000
ARG NPM_GID=1000

# Yank the node and npm binaries from the official Node docker container
COPY --from=node:10 /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node:10 /usr/local/bin/node /usr/local/bin/node
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
RUN npm install -g npx
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 \
Expand Down
34 changes: 34 additions & 0 deletions docker/php-build-eb/Dockerfile74
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

0 comments on commit 2aee79d

Please sign in to comment.