FROM php:8.1 ARG NODE_VER=20.11.1 SHELL ["/bin/bash", "-c"] RUN curl https://nodejs.org/dist/v$NODE_VER/node-v$NODE_VER-linux-x64.tar.xz | tar --file=- --extract --xz --directory /usr/local/ --strip-components=1 RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" RUN mv composer.phar /usr/local/bin/composer RUN apt-get update -yqq && apt-get install -yqq git 7zip envsubst libzip-dev rsync RUN mv /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini RUN docker-php-ext-install zip ARG user=deployer ARG group=deployer ARG uid=1000 ARG gid=1000 RUN groupadd -g ${gid} ${group} RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} USER ${uid}:${gid} WORKDIR /home/deployer RUN mkdir ~/.ssh RUN touch ~/.ssh/config RUN chmod 700 ~/.ssh COPY known_hosts ~/.ssh/known_hosts RUN chmod 600 ~/.ssh/* CMD /bin/bash