- Add common system directories to .dockerignore to prevent accidental inclusion
- Reorder Dockerfile instructions for better clarity and performance
- Remove remote deployment targets from Makefile to simplify local development workflow
- Use fully qualified image names for clarity
- Remove manual PHP extension installation as base image likely includes them
- Leverage COPY --chown to set permissions directly
- Remove redundant permission fix commands
- Keep same final command and exposed port
The base image is changed from the official php:8.4-fpm-alpine to thecodingmachine/php:8.4-v4-fpm-alpine to leverage additional pre-installed extensions, configurations, and utilities provided by the TheCodingMachine Docker images, which simplifies the setup for common PHP development and production environments.
- Replace manual apk install and docker-php-ext-install with mlocati/docker-php-extension-installer
- Combine system dependency installation and PHP extension setup into a single step
- Reorder steps for better clarity: copy files before permission fixes
- Maintain same PHP extensions and final permissions
- Use php:8.4-fpm-alpine for smaller image size
- Replace apt-get with apk package manager
- Use docker-php-ext-install instead of external extension installer
- Remove unnecessary comments and clean up cache appropriately
The docker-php-ext-install command can have permission issues on some
remote servers when extracting tarballs. Using mlocati/docker-php-extension-installer
provides a more reliable method for installing PHP extensions in Docker
containers.
The third-party extension installer (mlocati/docker-php-extension-installer) was causing tar permission issues on the remote server. Using the standard `docker-php-ext-install` method resolves this compatibility problem.
Add the --cleanup flag to the install-php-extensions command to remove downloaded archives after installation, reducing the final image size.
Use the --no-cache flag for the remote podman build in the deployment script to ensure a clean build from the latest source on the server.
The previous COPY instruction with --chown flag was not recursively setting permissions. Explicitly set directory and file permissions for the www-data user and remove unnecessary CI directories to reduce image size and potential security exposure.
- Update Dockerfile to use fully qualified composer image name
- Replace kubectl commands with podman kube play/down in Makefile
- Change from Kubernetes Secret to ConfigMap for environment variables
- Set imagePullPolicy to Never and use localhost/ prefix for local images
- Reduce replica count to 1 for local development
- Add stop target to Makefile for easier cleanup
Set working directory before copying files to avoid potential conflicts with host files. Also reorder Dockerfile steps for better logical flow and maintainability.
- Add .github and .circleci to .dockerignore to reduce image size
- Replace docker-php-ext-install with mlocati's extension installer for better reliability and maintenance
- Add comprehensive .dockerignore file to exclude unnecessary files
- Update Dockerfile to install required system dependencies and PHP extensions
- Set proper working directory and user permissions
- Use multi-stage build for Composer installation
- Replace Docker Compose setup with Kubernetes manifests for deployment
- Simplify Dockerfile to use PHP's built-in server instead of nginx+supervisor
- Add Makefile with build and deploy commands for local development
- Update environment configuration for production deployment
- Remove docker-specific configuration files (nginx.conf, supervisord.conf)
- Replace Laravel Sail docker-compose with a single-container Dockerfile
- Configure nginx and PHP-FPM via supervisor for production-like environment
- Include optimized PHP extensions and Redis support
- Simplify deployment by removing multi-service orchestration