This repository contains instructions and Dockerfile to create a custom PHP + Apache Docker image. This image is based on the official PHP + Apache image and includes custom configurations.
Before you begin, ensure you have the following prerequisites installed:
- Docker: Installation Guide
To create the custom PHP + Apache Docker image, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/agosalvez/apache-custom.git
-
Navigate to the project directory:
cd apache-custom
-
Build the Docker image:
docker build -t apache-custom .
Once the image is built, you can run a container using the following command:
docker run -d -p 80:80 -v YOUR_LOCAL_PATH:/var/www/html apache-custom
This command starts a container using your custom PHP + Apache image, and it will be accessible on port 80 of your localhost.
To add your own custom configurations to the PHP + Apache server, follow these steps:
-
Create a directory named
custom-config
in the root of this repository. -
Add your custom configuration files to the
custom-config
directory. -
Modify the
Dockerfile
to copy your custom configuration files into the container during the build process. You can use theCOPY
instruction in theDockerfile
to achieve this. -
Rebuild the Docker image as described in the "Build the Docker Image" section.
Your custom configurations will be included in the Docker image, and the Apache server will use them when a container is started.
If you'd like to contribute to this project, please follow these guidelines:
-
Fork the repository.
-
Create a new branch for your feature or bug fix:
git checkout -b feature/my-feature
-
Make your changes and commit them with a descriptive commit message.
-
Push your changes to your forked repository:
git push origin feature/my-feature
-
Create a pull request to the
main
branch of this repository.
Please ensure your code adheres to the existing coding style and includes appropriate documentation.
This project is licensed under the MIT License - see the LICENSE file for details. test