From 96ba456b1d7d49688481066bcb9471fa6edf8541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sat, 16 May 2026 16:58:54 +0200 Subject: [PATCH] chore(docker): use heredoc syntax for multi-step RUN blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert multi-command RUN instructions across all six Dockerfiles from '\\'-continuation joined with '&&' to < /app/public/index.php +RUN < /app/public/index.php +EOF COPY --link caddy/frankenphp/Caddyfile /etc/caddy/Caddyfile -RUN ln /etc/caddy/Caddyfile /etc/frankenphp/Caddyfile && \ - curl -sSLf \ - -o /usr/local/bin/install-php-extensions \ - https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \ - chmod +x /usr/local/bin/install-php-extensions +RUN < /app/public/index.php +RUN apk add --no-cache ca-certificates libcap mailcap + +RUN < /app/public/index.php +EOF COPY --link caddy/frankenphp/Caddyfile /etc/caddy/Caddyfile -RUN ln /etc/caddy/Caddyfile /etc/frankenphp/Caddyfile && \ - curl -sSLf \ - -o /usr/local/bin/install-php-extensions \ - https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \ - chmod +x /usr/local/bin/install-php-extensions +RUN < /root/.gdbinit + libtool +echo 'set auto-load safe-path /' > /root/.gdbinit +EOF WORKDIR /usr/local/src/php -RUN git clone --branch=PHP-8.5 https://github.com/php/php-src.git . && \ - # --enable-embed is necessary to generate libphp.so, but we don't use this SAPI directly - ./buildconf --force && \ - EXTENSION_DIR=/usr/lib/frankenphp/modules ./configure \ - --enable-embed \ - --enable-zts \ - --disable-zend-signals \ - --enable-zend-max-execution-timers \ - --with-config-file-path=/etc/frankenphp/php.ini \ - --with-config-file-scan-dir=/etc/frankenphp/php.d \ - --enable-debug && \ - make -j"$(nproc)" && \ - make install && \ - ldconfig /etc/ld.so.conf.d && \ - mkdir -p /etc/frankenphp/php.d && \ - cp php.ini-development /etc/frankenphp/php.ini && \ - echo "zend_extension=opcache.so" >> /etc/frankenphp/php.ini && \ - echo "opcache.enable=1" >> /etc/frankenphp/php.ini && \ - php --version +RUN <> /etc/frankenphp/php.ini +echo "opcache.enable=1" >> /etc/frankenphp/php.ini +php --version +EOF # Install e-dant/watcher (necessary for file watching) WORKDIR /usr/local/src/watcher -RUN git clone https://github.com/e-dant/watcher . && \ - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \ - cmake --build build/ && \ - cmake --install build +RUN < /root/.gdbinit && \ - echo '* soft core unlimited' >> /etc/security/limits.conf \ - && \ - apt-get clean + libtool-bin +echo 'set auto-load safe-path /' > /root/.gdbinit +echo '* soft core unlimited' >> /etc/security/limits.conf +apt-get clean +EOF WORKDIR /usr/local/src/php -RUN git clone --branch=PHP-8.5 https://github.com/php/php-src.git . && \ - # --enable-embed is only necessary to generate libphp.so, we don't use this SAPI directly - ./buildconf --force && \ - EXTENSION_DIR=/usr/lib/frankenphp/modules ./configure \ - --enable-embed \ - --enable-zts \ - --disable-zend-signals \ - --enable-zend-max-execution-timers \ - --with-config-file-path=/etc/frankenphp/php.ini \ - --with-config-file-scan-dir=/etc/frankenphp/php.d \ - --enable-debug && \ - make -j"$(nproc)" && \ - make install && \ - ldconfig && \ - mkdir -p /etc/frankenphp/php.d && \ - cp php.ini-development /etc/frankenphp/php.ini && \ - echo "zend_extension=opcache.so" >> /etc/frankenphp/php.ini && \ - echo "opcache.enable=1" >> /etc/frankenphp/php.ini && \ - php --version +RUN <> /etc/frankenphp/php.ini +echo "opcache.enable=1" >> /etc/frankenphp/php.ini +php --version +EOF # Install e-dant/watcher (necessary for file watching) WORKDIR /usr/local/src/watcher -RUN git clone https://github.com/e-dant/watcher . && \ - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \ - cmake --build build/ && \ - cmake --install build && \ - cp build/libwatcher-c.so /usr/local/lib/libwatcher-c.so && \ - ldconfig +RUN <> /etc/bashrc && \ - source /etc/bashrc +RUN <> /etc/bashrc +source /etc/bashrc +EOF # install build essentials -RUN yum install -y \ - perl \ - make \ - bison \ - flex \ - git \ - autoconf \ - automake \ - tar \ - unzip \ - gzip \ - gcc \ - bzip2 \ - patch \ - xz \ - libtool \ - perl-IPC-Cmd ; \ - curl -o make.tar.gz -fsSL https://ftp.gnu.org/gnu/make/make-4.4.tar.gz && \ - tar -zxvf make.tar.gz && \ - cd make-* && \ - ./configure && \ - make && \ - make install && \ - ln -sf /usr/local/bin/make /usr/bin/make && \ - cd .. && \ - rm -Rf make* && \ - curl -o cmake.tar.gz -fsSL https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-linux-$(uname -m).tar.gz && \ - mkdir /cmake && \ - tar -xzf cmake.tar.gz -C /cmake --strip-components 1 && \ - rm cmake.tar.gz && \ - curl -fsSL -o patchelf.tar.gz https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-$(uname -m).tar.gz && \ - mkdir -p /patchelf && \ - tar -xzf patchelf.tar.gz -C /patchelf --strip-components=1 && \ - cp /patchelf/bin/patchelf /usr/bin/ && \ - rm patchelf.tar.gz && \ - if [ "$(uname -m)" = "aarch64" ]; then \ - GO_ARCH="arm64" ; \ - else \ - GO_ARCH="amd64" ; \ - fi; \ - curl -o /usr/local/bin/jq -fsSL https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-${GO_ARCH} && \ - chmod +x /usr/local/bin/jq && \ - curl -o go.tar.gz -fsSL https://go.dev/dl/$(curl -fsS https://go.dev/dl/?mode=json | jq -r "first(first(.[] | select(.stable and (.version | startswith(\"go${GO_VERSION}\")))).files[] | select(.os == \"linux\" and (.kind == \"archive\") and (.arch == \"${GO_ARCH}\"))).filename") && \ - rm -rf /usr/local/go && \ - tar -C /usr/local -xzf go.tar.gz && \ - rm go.tar.gz && \ - /usr/local/go/bin/go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest +RUN <