chore: slim down docker build
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
.git
|
||||||
|
node_modules
|
||||||
|
packages
|
||||||
|
vendor
|
||||||
|
tests
|
||||||
+11
-13
@@ -2,8 +2,16 @@ FROM php:8.3-fpm
|
|||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
COPY . /var/www/app
|
||||||
|
WORKDIR /var/www/app
|
||||||
|
|
||||||
|
# Set permissions
|
||||||
|
RUN chown -R www-data:www-data . \
|
||||||
|
&& chmod -R 775 ./storage \
|
||||||
|
&& chmod +x ./docker/entrypoint.sh \
|
||||||
# Install common php extension dependencies
|
# Install common php extension dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
libfreetype-dev \
|
libfreetype-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
@@ -20,25 +28,15 @@ RUN apt-get update && apt-get install -y \
|
|||||||
zip \
|
zip \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
mysqli \
|
mysqli \
|
||||||
intl
|
intl \
|
||||||
|
|
||||||
# Set the working directory
|
|
||||||
COPY . /var/www/app
|
|
||||||
WORKDIR /var/www/app
|
|
||||||
|
|
||||||
# Install Node.js and npm
|
# Install Node.js and npm
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
&& apt-get install -y nodejs \
|
&& apt-get install -y nodejs \
|
||||||
&& npm install -g npm@latest
|
&& npm install -g npm@latest
|
||||||
|
|
||||||
# Copy over supervisor configuration
|
# Copy over supervisor configuration
|
||||||
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
# Set permissions
|
|
||||||
RUN chown -R www-data:www-data . \
|
|
||||||
&& chmod -R 775 ./storage \
|
|
||||||
&& chmod +x ./docker/entrypoint.sh
|
|
||||||
|
|
||||||
# Install composer
|
# Install composer
|
||||||
COPY --from=composer:2.6.5 /usr/bin/composer /usr/local/bin/composer
|
COPY --from=composer:2.6.5 /usr/bin/composer /usr/local/bin/composer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user