11FROM php:8.2-cli
2+
23RUN apt-get update \
3- && apt-get install -y unzip curl libzip-dev zlib1g-dev libpng-dev libjpeg-dev \
4- libfreetype6-dev git mariadb-client libmagickwand-dev openssh-client \
5- make --no-install-recommends
6- # ext-installs without dependencies
7- RUN docker-php-ext-install pdo_mysql zip \
8- && docker-php-ext-install exif \
9- && docker-php-ext-install intl
10- # PECL installs
11- RUN pecl install xdebug
12- # Enabling exts/installing exts with configurations
13- RUN docker-php-ext-enable xdebug
14- RUN docker-php-ext-install gd
15- # Get composer
4+ && apt-get install -y unzip curl libzip-dev zlib1g-dev libpng-dev libjpeg-dev \
5+ libfreetype6-dev git mariadb-client libmagickwand-dev openssh-client bash \
6+ make --no-install-recommends \
7+ && rm -rf /var/lib/apt/lists/*
8+
9+ RUN docker-php-ext-install pdo_mysql zip exif intl gd \
10+ && pecl install xdebug \
11+ && docker-php-ext-enable xdebug
12+
1613RUN curl -sS https://getcomposer.org/installer \
17- | php -- --install-dir=/usr/local/bin --filename=composer
18- # add user
19- RUN adduser --disabled-password --gecos "" appuser
20- RUN chown -R appuser:appuser /var/www/html
14+ | php -- --install-dir=/usr/local/bin --filename=composer
15+
16+ RUN adduser --uid 1000 --disabled-password --gecos "" --shell /bin/bash appuser
17+
18+ # Install qlty as root
19+ RUN curl https://qlty.sh | bash \
20+ && cp /root/.qlty/bin/qlty /usr/local/bin/qlty
21+
22+ USER appuser
23+ WORKDIR /var/www/html
24+
25+ RUN git config --global --add safe.directory /var/www/html
2126
22- # change to secured user
23- USER appuser
27+ CMD ["sleep" , "infinity" ]
0 commit comments