Sign inSign up

wunderman/azure_cli_php83_node18_docker

By wunderman

•Updated over 2 years ago

Image
0

1.2K

wunderman/azure_cli_php83_node18_docker repository overview

# Use PHP CLI only for build
FROM php:8.3-cli

# ACCEPT_EULA is required to silently install some packages
ENV ACCEPT_EULA=Y

# Update
RUN apt-get update

# Upgrade and keep openssh-server package config
RUN UCF_FORCE_CONFFOLD=1 apt-get upgrade -y

# Install mount utility (for Azure File Share)
RUN apt-get install -y cifs-utils

# Update PHP memory limit
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini RUN sed -i "s#memory_limit =.*#memory_limit = 1024M#g" /usr/local/etc/php/php.ini RUN sed -i "s#max_execution_time =.#max_execution_time = 18000#g" /usr/local/etc/php/php.ini

# Install PHP Extensions required by Symfony 6 (gd, zip)
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
RUN apt-get install -y libzip-dev zip \
&& docker-php-ext-install zip

# Install PHP Extensions required by Magento (intl, soap, bcmath, pdo_mysql, xsl, sockets)
RUN apt-get install -y libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
RUN apt-get install -y libxml2-dev \
&& docker-php-ext-install soap
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install pdo pdo_mysql
RUN apt-get install -y libxslt-dev libgcrypt-dev \
&& docker-php-ext-install -j$(nproc) xsl
RUN docker-php-ext-install sockets

# Install Composer 2 to compile backend
RUN apt-get install -y wget unzip \
&& php -r "copy('https://getcomposer.org/installer⁠', 'composer-setup.php');" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& unlink composer-setup.php

# Install Node 18
RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key⁠ | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x⁠ nodistro main" | tee /etc/apt/sources.list.d/nodesource.list RUN apt-get update \
&& apt-get install -y nodejs

# Install Yarn to compile frontend
RUN npm config set strict-ssl false \
&& npm install -g yarn

# Install Docker
RUN apt install -y docker.io && service docker start

# Install Azure CLI
RUN apt install curl jq -y && curl -sL https://aka.ms/InstallAzureCLIDeb⁠ | bash

# Install Azure SWA to Deploy static Web Applications
RUN npm install -g @azure/static-web-apps-cli

# Clean install packages from image
RUN apt-get clean

Tag summary

Content type

Image

Digest

sha256:586fa3bcb…

Size

552.3 MB

Last updated

over 2 years ago

docker pull wunderman/azure_cli_php83_node18_docker