mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 22:21:06 +03:30
42 lines
1.1 KiB
Docker
42 lines
1.1 KiB
Docker
# Use the official PHP image as the base image
|
|
FROM 'docker-proxy.meshkee.com/php:8.2-fpm'
|
|
|
|
# Set working directory inside the container
|
|
WORKDIR /var/www/html
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
curl \
|
|
libpng-dev \
|
|
libonig-dev \
|
|
libxml2-dev \
|
|
zip \
|
|
unzip \
|
|
libzip-dev \
|
|
libpq-dev \
|
|
libfreetype6-dev \
|
|
libjpeg62-turbo-dev \
|
|
libmcrypt-dev \
|
|
libssl-dev \
|
|
libicu-dev \
|
|
g++ \
|
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
|
&& docker-php-ext-install -j$(nproc) gd \
|
|
&& docker-php-ext-install pdo_mysql pdo_pgsql mbstring exif pcntl bcmath opcache intl zip
|
|
|
|
# Install Composer
|
|
COPY --from=docker-proxy.meshkee.com/composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
# Copy application code into the container
|
|
COPY . .
|
|
|
|
# Install PHP dependencies
|
|
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
|
|
|
|
# Set permissions for the Laravel project
|
|
RUN chown -R 1000:1000 /var/www/html \
|
|
&& chmod -R 777 /var/www/html/storage /var/www/html/bootstrap/cache
|
|
|
|
# Expose port 9000 for PHP-FPM
|
|
EXPOSE 9000 |