From 8b6804d7b8edc6289432b1337cf5076bb545735e Mon Sep 17 00:00:00 2001 From: Crisciany Date: Thu, 16 May 2024 16:23:31 -0400 Subject: [PATCH] change dockerfile Signed-off-by: Crisciany --- .docker/php/Dockerfile | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .docker/php/Dockerfile diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile new file mode 100644 index 0000000..90737d0 --- /dev/null +++ b/.docker/php/Dockerfile @@ -0,0 +1,43 @@ +FROM php:8.3-fpm + +ARG NODE_MAJOR=20 + +RUN apt-get update \ + && apt-get install -y \ + git \ + espeak-ng \ + # Install node + ca-certificates \ + curl \ + gnupg \ + # see https://github.com/nodesource/distributions + && 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_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ + && apt-get install nodejs -y \ + && node --version \ + && npm --version \ + # Clean package cache + && rm -rf /var/lib/apt/lists/* + +# Install PHP extensions and Composer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \ + && install-php-extensions \ + gd \ + xdebug \ + zip \ + @composer \ + && rm /usr/local/bin/install-php-extensions + +COPY xdebug.ini /usr/local/etc/php/conf.d/ + +RUN echo "alias jigsaw=./vendor/bin/jigsaw" >> /etc/bash.bashrc && \ + echo "alias compile='./vendor/bin/jigsaw build'" >> /etc/bash.bashrc && \ + /bin/bash -c "source /etc/bash.bashrc" + +WORKDIR /var/www/html + +COPY entrypoint.sh /var/www/scripts/ +ENTRYPOINT [ "bash", "/var/www/scripts/entrypoint.sh" ] \ No newline at end of file