Docker under Yum installs httpd and starts

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.