|
1 | | -FROM node:22-alpine AS node |
2 | | -FROM php:8.2-cli-alpine |
| 1 | +FROM ubuntu:22.04 |
3 | 2 |
|
4 | | -RUN apk add --no-cache libstdc++ libgcc jq git curl unzip sshpass openssh-client rsync bash |
| 3 | +ARG DEBIAN_FRONTEND=noninteractive |
| 4 | + |
| 5 | +# Allow PHP version and composer version to be overriden |
| 6 | +ARG PHP_VERSION=8.2 |
| 7 | +ARG COMPOSER_VERSION=2.2 |
| 8 | + |
| 9 | +ENV LANG=en_US.UTF-8 \ |
| 10 | + LC_ALL=en_US.UTF-8 \ |
| 11 | + # keep the daemons quiet(er) |
| 12 | + ES_JAVA_OPTS="-Xms512m -Xmx512m" |
| 13 | + |
| 14 | +ENV CI=true |
| 15 | + |
| 16 | +RUN apt-get update && \ |
| 17 | + apt-get install -y --no-install-recommends \ |
| 18 | + lsb-release ca-certificates curl wget gnupg2 software-properties-common \ |
| 19 | + apt-transport-https locales patch diffutils \ |
| 20 | + unzip zip git jq patch ssh-client vim rsync && \ |
| 21 | + locale-gen en_US.UTF-8 && \ |
| 22 | + update-locale LANG=en_US.UTF-8 |
| 23 | + |
| 24 | + |
| 25 | +# PHP (Ondřej Surý PPA – gives every version 7.2-8.4) :contentReference[oaicite:0]{index=0} |
| 26 | +RUN add-apt-repository -y ppa:ondrej/php |
| 27 | + |
| 28 | +RUN mkdir -p /run/php && \ |
| 29 | + apt-get update && \ |
| 30 | + apt-get install -y --no-install-recommends \ |
| 31 | + # PHP core + typical Magento extensions |
| 32 | + php${PHP_VERSION} \ |
| 33 | + php${PHP_VERSION}-fpm \ |
| 34 | + php${PHP_VERSION}-cli \ |
| 35 | + php${PHP_VERSION}-bcmath \ |
| 36 | + php${PHP_VERSION}-bz2 \ |
| 37 | + php${PHP_VERSION}-curl \ |
| 38 | + php${PHP_VERSION}-gd \ |
| 39 | + php${PHP_VERSION}-intl \ |
| 40 | + php${PHP_VERSION}-mbstring \ |
| 41 | + php${PHP_VERSION}-mysql \ |
| 42 | + php${PHP_VERSION}-mysqli \ |
| 43 | + php${PHP_VERSION}-xml \ |
| 44 | + php${PHP_VERSION}-zip \ |
| 45 | + php${PHP_VERSION}-opcache \ |
| 46 | + php${PHP_VERSION}-soap \ |
| 47 | + php${PHP_VERSION}-ftp \ |
| 48 | + php${PHP_VERSION}-xsl \ |
| 49 | + php${PHP_VERSION}-sockets \ |
| 50 | + php${PHP_VERSION}-exif \ |
| 51 | + # misc |
| 52 | + tzdata && \ |
| 53 | + apt-get clean && rm -rf /var/lib/apt/lists/* |
| 54 | + |
| 55 | +# Install Node 22 |
| 56 | +RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - && \ |
| 57 | + apt-get install -y nodejs && \ |
| 58 | + node --version && \ |
| 59 | + npm --version |
5 | 60 |
|
6 | 61 | # Install Composer |
7 | | -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --2.2 |
8 | | - |
9 | | -# Install PHP extensions |
10 | | -RUN apk add --no-cache \ |
11 | | - # Install dependencies for PHP extensions |
12 | | - oniguruma-dev icu-dev libxml2-dev libpng-dev libjpeg-turbo-dev freetype-dev libxslt-dev \ |
13 | | - libzip-dev zip zlib-dev libmcrypt-dev gmp-dev libintl linux-headers patch diffutils |
14 | | - |
15 | | -RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ |
16 | | - && docker-php-ext-install -j$(nproc) \ |
17 | | - bcmath \ |
18 | | - ctype \ |
19 | | - dom \ |
20 | | - fileinfo \ |
21 | | - gd \ |
22 | | - intl \ |
23 | | - mbstring \ |
24 | | - opcache \ |
25 | | - pcntl \ |
26 | | - pdo_mysql \ |
27 | | - simplexml \ |
28 | | - soap \ |
29 | | - xsl \ |
30 | | - zip \ |
31 | | - sockets \ |
32 | | - && docker-php-ext-enable bcmath ctype dom fileinfo gd intl mbstring opcache pcntl pdo_mysql simplexml soap xsl zip sockets |
33 | | - |
34 | | -COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules |
35 | | -COPY --from=node /usr/local/include/node /usr/local/include/node |
36 | | -COPY --from=node /usr/local/share/man/man1/node.1 /usr/local/share/man/man1/node.1 |
37 | | -COPY --from=node /usr/local/share/doc/node /usr/local/share/doc/node |
38 | | -COPY --from=node /usr/local/bin/node /usr/local/bin/node |
39 | | -COPY --from=node /opt/ /opt/ |
40 | | -RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm |
41 | | -RUN ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx |
42 | | -RUN ln -s /opt/yarn-$(ls /opt/ | grep yarn | sed 's/yarn-//')/bin/yarn /usr/local/bin/yarn |
43 | | -RUN ln -s /opt/yarn-$(ls /opt/ | grep yarn | sed 's/yarn-//')/bin/yarnpkg /usr/local/bin/yarnpkg |
| 62 | +RUN curl -sS https://getcomposer.org/installer | php -- --${COMPOSER_VERSION} --install-dir=/usr/local/bin --filename=composer && \ |
| 63 | + composer --version |
0 commit comments