35 lines
885 B
Docker
Executable File
35 lines
885 B
Docker
Executable File
FROM php:8.1-fpm
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
libpng-dev \
|
|
libjpeg-dev \
|
|
libfreetype6-dev \
|
|
libzip-dev \
|
|
unzip \
|
|
libcurl4-openssl-dev \
|
|
libonig-dev \
|
|
imagemagick \
|
|
libmagickwand-dev \
|
|
&& pecl install imagick \
|
|
&& docker-php-ext-enable imagick
|
|
|
|
RUN docker-php-ext-install gd pdo pdo_mysql zip curl mbstring xml
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
|
RUN apt-get install -y nodejs
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
COPY . .
|
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
|
RUN composer update && composer install
|
|
RUN npm ci
|
|
|
|
# Set Laravel's permissions and setup storage, though this could be done in the COPY command directly
|
|
RUN chown -R www-data:www-data .
|
|
RUN chmod -R 755 /var/www/html/storage
|
|
RUN php artisan storage:link
|
|
|
|
|
|
EXPOSE 9000
|
|
CMD ["php-fpm"]
|