(1) creates a new container, and run the given command in it Docker-save (1) save a mirror as tar package file Docker-search (1) Search for an image in Dockerindex Docker-start (1) Start a container
installation and basic commands for Docker
first, the installation of Docker
Here only the CentOS system installation docker, operating system kernel version requirements above 3.10 and must be 64 bits, generally centos 6.5 or above, if not sure, you can view the kernel version, typing command
Uname-r
Yum installat
(LI NK is external) Docker logs command-gets the container's log (link is external) Docker Pause command-suspends all processes in the container (link is external) Docker Port command Port forwarding ( Link is external)
mirrors from the local.-F forcibly removes the image, even if it is being used;--no-prune does not remove the process image of the image, which is removed by default.Ten. Docker RMDocker rm [options ' o ';] Docker rm nginx-01 nginx-02 db-01 db-02sudo docker rm-l/webapp/redis-F forcibly removes the container, even if it is running;-L removes the network connectio
should
.
Digest:sha256:3aaab9f1297db9b013063c781cfe901e2aa6e7e334c1d1f4df12f25ce356f2e5
status:downloaded Newer Image for Centos:latest
Hello World
Command Description:
Docker run: Standard container launch command
CentOS: Mirror name, default is latest
Echo and subsequent content: command to execute after the
package docker-history (1) display the history of an image docker-images (1) list existing imagedocker-import (1) import a tar package to create an imagedocker-info (1). Some Related System Information docker-inspect (1) is displayed. Docker-kill (1) close a running container (including processes and all resources)
installation method. What does it do? It's easy. He downloads a series of packages we put on GitHub to your machine and installs them. There aren't many packages, just right.
Simplified steps1. Insert the SD card and install arch Linux on the SD card.
2. start your Raspberry Pi, find its IP address (how to set the [set Raspberry Pi IP address]), and log on to the root account through SSH. The default root password of arch Linux is root, if you have
This article mainly discusses the method of using Docker to quickly start a MySQL test, including the MAC environment. Let's have a look!
There has been a lot of discussion about Docker in the industry these days, and the ecosystem is developing very quickly, however, it is easy to find mature technology from simple "getting Started" or "guiding" articles, but
Docker Quick Start series (3): warehouse concepts and related operationsDocker Hub
First, we need to distinguish two concepts: warehouse and registration server.In Docker, the repository stores images in a centralized manner, while the registration server stores images in the repository,A registration server can store multiple warehouses, for example:
The address
the history of a image images List images
Import Create A new filesystem image from the contents of a Tarball info Display system-wide Information Inspect return low-level information in a container kill kill a running container load load an image f Rom a tar archive login Register or log iN to a Docker registry server logout Log out from a Docker registry server logs Fetch the logs of a Contai NER Por
Execute Docker PS command, appear
"Cannot connect to the Docker daemon at Unix:///var/run/docker.sock. Is the Docker daemon running?
Error
It is now determined that the Docker itself is installed properly.
The problem is because the
:5000是指把宿主机的5000端口映射到registry镜像容器的5000端口上。After a registry container is automatically downloaded and started, a local private warehouse service is created, and the warehouse is created in the container's/tmp/registry directory by default. You can use the-v parameter to store the image file on a locally-established path.5000:5000 -v /opt/data/registry:/tmp/registry registryManagement of Private warehouse imagesdocker imagesUse the Docker tag
Use docker for laravel development environment. By the way, we will introduce how to use laravel to set up the docker container cost commands. Laravel is one of the most popular php development frameworks in 2015.
I have some similar introductions on the Internet, but I think I should write one myself.Create a file and grant the executable permission. The objective is to run the coomposer image as a local
View
Docker PSThere are some main parameters to say1. Without parameters, to view the currently running container2. A, view all containers including the stop state of the container3-L to view the newly created container4.-n=x, view the last created X containerMake a list of the results of Docker PSCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESWhat do thes
identification Name (--name)-PID equivalent IPC Setting networ K Settings Clean Up (--RM) runtime Constraints on CPU and Memory Runtime Privilege, Linux capabilities, and LXC Configurat Ion
We'll go through this in turn.
Detached vs Foreground
When we start a container, we first need to determine whether the container is running in the foreground or running in the background.
-d=false:detached Mode:run container in the background, print new con
Docker container, in the development of the program → Test → release, the whole process can ensure the consistency of the environment, and greatly reduce the workload and time. This is the main reason why Docker is very popular.
Speaking of which, you may not be able to wait, let's use the Docker.
3. Use Docker
The
Network namespaces:
You can refer to this article in detail:http://blog.csdn.net/guizaijianchic/article/details/78444638Contains the use of IP netnsIP netns Add net1 create a new network space Common instructions: IP link
IP link Add
IP link Add type veth #添加veth pair, after creation remember up IP link set veth0 up
ex:ip link add vethfoo type Veth peer name vethbar
IP link Set
IP link set dev netns name puts DEV in the namespace of name
Ex:ip link set veth0 netns net0
IP link set dev up/down
Docker is one of the most popular application containers in the present, and has a unique advantage in rapid system deployment. Because of a recent project to use Docker, I found some information to learn. Docker has a unique advantage not only in application rapid deployment, but also in resource sharing and utilization. For example, you can open hundreds or tho
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.