test
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -1,19 +1,26 @@
|
|||||||
FROM docker.io/thecodingmachine/php:8.4-v4-fpm-alpine
|
# Using the slim version of 8.4; it's much more stable with Podman
|
||||||
|
FROM docker.io/php:8.4-fpm-alpine
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
# Use the installer to get your specific extensions without the manual tar extraction
|
||||||
|
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/install-php-extensions && \
|
||||||
|
install-php-extensions pdo_mysql mbstring exif pcntl bcmath gd zip intl
|
||||||
|
|
||||||
# Get latest Composer
|
# Get latest Composer
|
||||||
COPY --from=docker.io/composer:latest /usr/bin/composer /usr/bin/composer
|
COPY --from=docker.io/composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
# Copy application files
|
# Copy application files
|
||||||
# TheCodingMachine images default to user 'docker' (UID 1000)
|
COPY . /var/www
|
||||||
COPY --chown=docker:docker . /var/www
|
|
||||||
|
|
||||||
# You can likely remove the manual chmod/chown lines
|
# Fix permissions for the www-data user
|
||||||
# as this image handles them via environment variables if needed.
|
RUN chown -R www-data:www-data /var/www && \
|
||||||
|
chmod -R 755 /var/www/storage /var/www/bootstrap/cache
|
||||||
|
|
||||||
|
USER www-data
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
# Use the image's built-in entrypoint or your artisan command
|
|
||||||
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"]
|
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"]
|
||||||
Reference in New Issue
Block a user