Docker Learning Notes

Source: Internet
Author: User

Docker explanation




1. Create Docke Image:

650) this.width=650; "style=" float:left; "src=" http://s3.51cto.com/wyfs02/M00/76/84/ Wkiol1zvzphrzr72aaaq8pybdl0380.png "title=" 2015-11-25 15:33:48 screen. png "alt=" wkiol1zvzphrzr72aaaq8pybdl0380.png "/ >

Docker build-t csphere/centos:7.1.

Explanation: Build loaded Dockerfile,-t alias Centos7 Mirror. Represents the current Dockerfile path, if Dockerfile no longer the current path, use a relative path/path the Docker build is created using a dockerfile Mirror

Docker images viewing Docker images

Create Dokcer container via Docker Image: Docker run-it interactive mode, to front end,-D back-end boot-p 22 port reboot unchanged--name base-p 2,222:22 Port 22 Random get port Mappings 22

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/76/85/wKioL1ZVaO2g7N8hAAA56dR1T-o352.png "style=" float: none; "title=" 2015-11-25 15:51:13 screen. png "alt=" Wkiol1zvao2g7n8haaa56dr1t-o352.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/76/86/wKiom1ZVaJGRkTWuAAAtzm1YxSw003.png "style=" float: none; "title=" 2015-11-25 15:50:55 screen. png "alt=" Wkiom1zvajgrktwuaaatzm1yxsw003.png "/>

Get help with Docker assist run


2. Build PHP-FPM image

[Email protected]:~/docker-training/php-fpm$ Docker build-t csphere/php-fpm:5.4.

Docker run-d-P 8080:80--name website csphere/php-fpm:5.4


Docker exec-it Website/bin/bash


Docker Learning Notes

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.