Skip to content

Commit

Permalink
Use heredoc syntax for installphase in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lillecarl committed Jan 6, 2025
1 parent b6ca24d commit 88d2f30
Showing 1 changed file with 40 additions and 19 deletions.
59 changes: 40 additions & 19 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
FROM php:8.1-fpm-bookworm
FROM docker.io/php:8.1-fpm-bookworm

WORKDIR /usr/local/share/cypht

ENV DEBIAN_FRONTEND=noninteractive
ENV COMPOSER_CACHE_DIR=/tmp/composer_cache
ENV COMPOSER_HOME=/tmp/composer_home

RUN set -e \
&& apt-get update && apt-get install -y \
supervisor nginx sqlite3 libfreetype6-dev libpng-dev libjpeg-dev \
libxml2-dev libzip-dev unzip \
&& apt-get install -y --no-install-recommends \
ca-certificates \
&& apt-get install -y --no-install-recommends \
RUN <<BASH
set -e
apt-get update
apt-get install -y \
supervisor \
nginx \
sqlite3 \
libfreetype6-dev \
&& docker-php-ext-configure gd \
&& docker-php-ext-install session fileinfo dom xml xmlwriter gd pdo pdo_mysql mysqli \
&& docker-php-ext-configure zip \
&& docker-php-ext-install zip \
&& curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
xdebug redis gnupg memcached \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
libpng-dev \
libjpeg-dev \
libxml2-dev \
libzip-dev \
libpq-dev \
unzip
apt-get install -y --no-install-recommends \
ca-certificates
apt-get install -y --no-install-recommends \
libfreetype6-dev
docker-php-ext-configure gd
docker-php-ext-install \
session \
fileinfo \
dom \
xml \
xmlwriter \
gd \
pdo \
pdo_pgsql \
pdo_mysql \
mysqli
docker-php-ext-configure zip
docker-php-ext-install zip
curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
xdebug redis gnupg memcached
rm -rf /var/lib/apt/lists/*
apt-get clean
ln -sf /dev/stdout /var/log/nginx/access.log
ln -sf /dev/stderr /var/log/nginx/error.log
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
BASH

RUN printf "[xdebug] \n\
zend_extension=xdebug.so \n\
Expand Down

0 comments on commit 88d2f30

Please sign in to comment.