Skip to content

🌐 Run a lightweight container with Alpine, Nginx, and PHP-FPM for seamless WordPress deployment and management.

Notifications You must be signed in to change notification settings

yomary0990/alpine-nginx-php-fpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐳 alpine-nginx-php-fpm - Simple Setup for Your Web Container

Download

πŸ“¦ Overview

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.

πŸš€ Getting Started

To run the alpine-nginx-php-fpm container, you need Docker installed on your computer. Here’s how to get started step-by-step.

πŸ”§ System Requirements

  • Operating System: Any OS that supports Docker (e.g., Windows, macOS, Linux)
  • Docker Version: Ensure you have Docker version 20.10 or higher.

πŸ“₯ Download & Install

  1. Visit the Releases Page: Go to the Releases page on GitHub.
  2. Download the Latest Release: Find the latest version listed there and click on it to see the available assets.
  3. Choose Your File: Download the appropriate docker-compose file or Docker image as per your needs.

Download

βš™οΈ Running the Container

After downloading, follow these instructions to run your container.

1. Open Your Terminal or Command Prompt

  • On Windows, press Win + R, type cmd, and hit Enter.
  • On macOS, open the Terminal application from your applications folder.
  • On Linux, open your preferred terminal.

2. Navigate to the Downloaded File

Change the directory to where you downloaded the Docker file. For example:

cd path/to/your/downloaded/file

3. Run the Docker Image

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.

4. Access Your Application

Open your web browser and go to http://localhost. You should see the default nginx welcome page, indicating that your server is running.

πŸ“„ Configuration

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.

πŸ› οΈ Available Features

  • 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.

🏷️ Topics

  • alpine
  • alpine-linux
  • container
  • docker
  • docker-container
  • nginx
  • nginx-php-fpm
  • php-84
  • php-fpm
  • php-fpm-84
  • php-fpm-v84
  • wp-cli

πŸ“… Updating Your Container

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.

❓ Troubleshooting

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.

πŸ“¬ Support

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.