First, Docker installation
1.1 Official methods
Official download page: http://www.docker.com/products/docker#/windows
Official: Https://download.docker.com/win/stable/InstallDocker.msi
1.2 Recommended Method:
1.2.1 Dockertoolbox official Address: Http://www.docker.com/products/docker-toolbox
Official Latest Version: https://github.com/docker/toolbox/releases/tag/v1.12.3
Official Boot2docker.iso Address: https://github.com/boot2docker/boot2docker/releases
Recommended download the latest version of Dockertoolbox and Boot2docker.iso (image file recommended download)
1.2.2 Dockertoolbox-win-64 version Baidu Cloud:
Link: Http://pan.baidu.com/s/1dFNw3RF Password: lz19
Download the Docker Windows version executable and install it.
The first run environment is prepared when you run Docker QuickStart terminal with Dockertoolbox installation, Need to download the Boot2docker.iso file, the location of the download will be prompted when opening the terminal (may need to press Enter), download good boot2docker.iso and placed in the specified folder can quickly prepare the environment, put the image need to reopen the Quick start terminal.
Ii. Methods of Use
After installing Docker and preparing the environment, open the Docker QuickStart terminal to start the Docker runtime environment.
First, let's check to see if Docker is installed correctly with the following command:
Docker info
If this command is not found, Docker is not installed correctly.
All Docker commands can be viewed with the following commands:
Docker Help
Iii. Common Commands
To view a running container
Docker PS
Docker ps-a is for viewing all containers, including those that have been stopped.
Remove all containers
Docker RM $ (Docker ps-a-Q)
Delete a single container
Docker RM < container name Orid>
Stop, start, kill a container
Docker Stop < container name orid>
Docker Start < container name orid>
Docker Kill < container name orid>
View all Mirrors
Docker images
Run a new container, naming it, port mapping, and folder mapping. Take Redmine Mirror as an example
Docker run--name redmine-p 9003:80-p 9023:22-d-v/var/redmine/files:/redmine/files-v/var/redmine/mysql:/var/lib/mys QL Sameersbn/redmine
The container is connected to the Mmysql container and the Mmysql container is renamed to DB. In this way, the sonar container can use the relevant environment variables of DB.
Pull Mirror
Docker Pull < mirror name:tag>
For example
Docker Pull Sameersbn/redmine:latest
Copy files from container
sudo docker CP 7bb0e258aefe:/etc/debian_version.
Copy the/etc/debian_version in 7bb0e258aefe to the current directory.
Docker installation and usage instructions--docker for Windows