Skip to content

Commit

Permalink
change dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Any97Cris committed May 16, 2024
1 parent fd6c455 commit 84f798c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]

0 comments on commit 84f798c

Please sign in to comment.