This project provides a Docker container that combines Alpine Linux 3.21, nginx 1.26.3-r0, PHP-FPM 8.4.11, and WP-CLI 2.12.0. This setup is lightweight and efficient, perfect for running PHP applications and websites smoothly.
To run the alpine-nginx-php-fpm container, you need Docker installed on your computer. Hereβs how to get started step-by-step.
- Operating System: Any OS that supports Docker (e.g., Windows, macOS, Linux)
- Docker Version: Ensure you have Docker version 20.10 or higher.
- Visit the Releases Page: Go to the Releases page on GitHub.
- Download the Latest Release: Find the latest version listed there and click on it to see the available assets.
- Choose Your File: Download the appropriate docker-compose file or Docker image as per your needs.
After downloading, follow these instructions to run your container.
- On Windows, press
Win + R
, typecmd
, and hitEnter
. - On macOS, open the
Terminal
application from your applications folder. - On Linux, open your preferred terminal.
Change the directory to where you downloaded the Docker file. For example:
cd path/to/your/downloaded/file
Use the following command to run the Docker container:
docker run -d -p 80:80 -p 9000:9000 your-image-name
Replace your-image-name
with the name of the downloaded image. This command will start your container in detached mode.
Open your web browser and go to http://localhost
. You should see the default nginx welcome page, indicating that your server is running.
You may want to configure your container based on the needs of your application. The configuration files are located in the containerβs file system. Access them through the Docker terminal:
docker exec -it your-container-name /bin/sh
Replace your-container-name
with the name of your running container.
- Lightweight container based on Alpine Linux.
- Nginx for serving your application with high performance.
- PHP-FPM for efficient PHP processing.
- WP-CLI for managing WordPress installations from the command line.
- alpine
- alpine-linux
- container
- docker
- docker-container
- nginx
- nginx-php-fpm
- php-84
- php-fpm
- php-fpm-84
- php-fpm-v84
- wp-cli
To ensure that you're using the latest version of the alpine-nginx-php-fpm container, regularly check the Releases page for updates. Follow the download steps and replace your existing container with the new one for enhanced performance and security.
If you experience issues, consider the following steps:
- Ensure Docker is running.
- Check if the image name is correct if you encounter "image not found" errors.
- Consult the Docker logs using:
docker logs your-container-name
This will help you identify and resolve issues.
For further assistance, please use the issue tracker on the GitHub repository page. You can report bugs or request features there, and the community or maintainers will assist you.
This README aims to simplify your setup process. With this container, you will have a powerful environment for your PHP applications.