The author of the Docker container online find Dockers yum installation httpd are first set up dockerfile files, I contend not to establish Dockerfile file installation and start httpd services, now complete sharing the following. First yum-y instal Docker installs the Docker container, then sets the boot: Systemctl start Docker, and is set to the next boot: Systemctl enable Docker, then: Docker images View the following no image files we need to go online to pull one, pull command: Docker pulls Docker.io/centos. After the pull is taken. Run and map port number: Docker run-p 80:80--name apache-it docker.io/centos:latest/bin/bash. Enter the terminal of the Mirror to run: yum-y install httpd Apache installed, after the installation is completed into the default path to establish a Web page since Docker does not have VIM editor here with the VI Editor: vi/var/www/html/index.html. Set up a good web page to go: vi/etc/httpd/conf/httpd.conf found 95 lines of ServerName localhost:80 the # comment removed can be replaced by the domain name or localhost IP address. Finally run the httpd command to start the Apache service, Ann Ctrl+p+q let the service run in the background, want to enter the running service input: Docker attach plus container ID. View the image and save: Docker ps-a. After query: The Docker commit mirror ID mirror the parent name and
Tag name
Docker under Yum installs httpd and starts