Sign inSign up

davescripts/centos-8-apache-php-using-systemd

By davescripts

•Updated over 5 years ago

Centos 8, Apache, and PHP, using systemd

Image
0

10K+

davescripts/centos-8-apache-php-using-systemd repository overview

⁠Docker Container: Centos8, Apache, and PHP, using systemd

Dockerfile for a Container with Centos 8, Apache, and PHP, using systemd, for Web Development.

More details can be found here⁠.


⁠Build

Create Docker Image.

docker build -t <image_name> .

Replace <image_name> with the name you want for the image.


Example.

docker build -t image_centos8 .

⁠Run

Create Docker Container.

docker run -tid -p 4000:80 --name=<container_name> --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /path_to/folder:/var/www/html <image_name>

Replace <container_name> with the name you want for the container, and <image_name> with the name of the image you specified on the Build command above.


Example.

docker run -tid -p 4000:80 --name=container_centos8 --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /path_to/folder:/var/www/html image_centos8

Also change "/path_to/folder" with the actual location of your website's root folder on your local machine.


⁠Test

Open the http://localhost:4000⁠ url on your browser.

Tag summary

Content type

Image

Digest

Size

135.6 MB

Last updated

over 5 years ago

docker pull davescripts/centos-8-apache-php-using-systemd