41 lines
887 B
Docker
41 lines
887 B
Docker
FROM docker.io/alpine:3.21
|
|
|
|
# Install PHP 8.4 and common extensions from Alpine community repos
|
|
RUN apk add --no-cache \
|
|
php84 \
|
|
php84-fpm \
|
|
php84-pdo_mysql \
|
|
php84-mbstring \
|
|
php84-exif \
|
|
php84-pcntl \
|
|
php84-bcmath \
|
|
php84-gd \
|
|
php84-zip \
|
|
php84-intl \
|
|
php84-curl \
|
|
php84-tokenizer \
|
|
php84-xml \
|
|
php84-xmlwriter \
|
|
php84-session \
|
|
git \
|
|
curl
|
|
|
|
# Create a symlink so 'php' command works
|
|
RUN ln -sf /usr/bin/php84 /usr/bin/php
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy application files
|
|
COPY . /app
|
|
|
|
# Get Composer
|
|
COPY --from=docker.io/composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
# Clean up unnecessary directories and fix permissions
|
|
RUN rm -rf /app/.circleci /app/.github && \
|
|
chmod -R 775 /app/storage /app/bootstrap/cache
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"] |