Files
kulakpos_web/Dockerfile
eko bb599d7e0e
Some checks failed
Build, Push and Deploy / build-and-deploy (push) Failing after 1m57s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
fix docker
2026-03-23 11:32:51 +07:00

53 lines
1.3 KiB
Docker

FROM php:8.2-fpm-alpine
# Install system dependencies
RUN apk add --no-cache \
vim \
xxd \
libzip-dev \
postgresql-dev \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
oniguruma-dev \
git \
curl \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
pdo_pgsql \
pgsql \
opcache \
zip \
bcmath \
gd \
exif \
pcntl
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
# Copy ALL application files first (needed for custom autoload paths)
COPY --chown=www-data:www-data . .
# Create storage directories
RUN mkdir -p storage/framework/{cache,sessions,views} \
&& mkdir -p storage/logs \
&& mkdir -p bootstrap/cache \
&& chmod -R 777 storage \
&& chmod -R 777 bootstrap/cache
# Install dependencies (now all app files exist for autoloading)
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader
# Generate key (after composer install)
RUN php artisan key:generate --no-interaction --force
# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8000 9000
ENTRYPOINT ["/entrypoint.sh"]