sb-minimal / docker-ubuntu-apache-php

Minimal Docker Image for Apache+PHP (based on minimal ubuntu)
MIT License
1 stars 0 forks source link

I would like to modify the httpd.conf file, how do? #3

Open kaingeyy opened 7 years ago

kaingeyy commented 7 years ago

Because there is an option in httpd.conf is not closed, resulting in the file can be browsed

sb-minimal commented 7 years ago

Basically you can change the configuration by basing your image on sb-minimal/docker-ubuntu-apache-php and adding your custom config files.

Create a Dockerfile, containing:

FROM sbminimal/docker-ubuntu-apache-php
ADD overlay/ /

and place your custom configfiles in ./overlay/etc/apache2 . You might for example want to overwrite ./overlay/etc/apache2/sites-available/000-default.conf

Hope this helps and points you in the right direction.

kaingeyy commented 7 years ago

I created the Dockerfile FROM sbminimal / docker-ubuntu-apache-php ADD overlay/ /

Build image: Docker build -t myapache: web myapache/Dockerfile

Create file overlay/etc/apache2/sites-available/000-default.conf

What to do next?

kaingeyy commented 7 years ago

my email address : kaingeyy@outlook.com please help me ,thank you very much.

sb-minimal commented 7 years ago

you first create the file overlay/etc/apache2/sites-available/000-default.conf, then build the image - now the configuration is in your image and you can use your image instead of sbminimal/docker-ubuntu-apache-php and it will use your configuration.