Docker installation and usage instructions--docker for Windows

Source: Internet
Author: User
Tags redmine docker ps docker cp docker run

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

Related Article

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.