start container docker run-ti Ubuntu/bin/bash
Docker run = First Docker Create and then Docker start
-T means to have Docker assign a pseudo terminal and bind to the container's standard input
When the-T is used, the command
Docker Quick Start series (2): container concepts and related operations, docker Quick StartWhat is container
To put it simply, an image requires a carrier, which is a container. As mentioned in the previous article, an additional writable file layer will be started after th
that no files are added to the new layer of mirrors at this time, but the mirrored JSON file is updated to obtain this information when the container is launched through this image.
CMD ["./run.sh"]: Sets the default execution entry for the mirror, which also does not add any files to the new image, but updates the JSON file for the new image only on the basis of the previous layer of mirrored JSON files.
advantage of importing a mirrored snapshot file that will lose all history and metadata information.
Note: container migration can be achieved by exporting containers and importing containers (copying files)
Warehouse
A warehouse is a place where mirrors are centrally located, and there are many warehouses on a registered server, and many mirrors in a warehouse.
1. Login
$ docker Login
2.
whether or not to upgrade the success of the "luck": My two blades, is one upgrade successfully one upgrade failed (always reported NIC problem).
2. Upgrade Docker to 1.9.1 version
Downloading Docker's official installation package from the country is slow, using the method provided by Daocloud.io to quickly install the latest version of Docker:
$ curl -sSL https://get.daocloud.io/
Objective
Today, in the Docker, we are able to easily package our applications with containers and deploy them on our servers and run them. However, talking about how to stop the Docker container in the running and terminate the program correctly is a very worthwhile topic to discuss.
In fact, in our daily projects, this is a problem that we often have to confr
forwarding process. This process can be confirmed by traceroute:
$ sudo ip netns exec Container_ns1 traceroute 172.17.0.2traceroute to 172.17.0.2 (172.17.0.2), 30 hops max, 60 byte packets 1 172.16.1.254 (172.16.1.254) 0.082 ms 0.023 ms 0.019 ms 2 172.17.0.2 (172.17.0.2) 0.054 ms 0.034 ms 0.029 ms$ sudo ip netns exec Container_ns1 ping -c 3 172.17.0.2PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.64 bytes from 172.17.0.2: icmp_seq=1 ttl=63 time=0.084 ms64 bytes from 172.17.0.2: ic
meaning of each command, so as to lay the foundation for our learning behind.
4, Docker independent IP and container interconnection
Built-in Bridge (NAT) disadvantage: the need for supporting service registration/discovery, or host port allocation difficulties, easy to conflict. The way in which DNS is not available in the front-end routing layer Nginx Config
, then you need to use the-e lxc option to restart the Docker service process. With this option, the LXC Management container will be used again within the Docker. The easiest way to accomplish this task is to create the/etc/default/docker file (if it still does not exist) a
--------------------------------------------------------------------------------------
Blog:http://blog.csdn.net/chinagissoft
QQ Group: 16403743
Purpose: Focus on the "gis+" cutting-edge technology research and exchange, the cloud computing technology, large data technology, container technology, IoT and GIS in-depth integration, explore the "gis+" technology and industry solutions
Reprint Note: The article is allowed to reprint, but must be linked to
In front of our lab environment, only one Docker host container is running on this host. However, in a real environment, there will be multiple host containers that start, run, stop, and destroy related containers in these hosts, regardless of whether they are located in the same host.How can we manage such a multi-host environment efficiently?The first problem we faced was installing and configuring
Adjust the partition size of Rootfs in Docker
The main introduction here is to adjust the size of the rootfs within the container, Rootfs the default is 10G, we can increase the size by the following method.bash-4.1# DF-LHTFileSystem Type Size Used avail use% mounted onRootfs rootfs 9.8G 1.4G 7.9G 15%/Tmpfs tmpfs 921M 0 921M 0%/devSHM tmpfs 64M 0 64M 0%/dev/shm/dev/vdb xfs 100G 2.1G 98G 3%/etc/resolv.conf/d
mirror image in a dockerfile file, typically based on a system-type image, then describe what software to install, what configuration to do, what ports to advertise, and so on, and execute the Docker build command to generate this image. You can publish your own images in a public or private mirrored warehouse.
Internet
Network, network. The containers created by default have a bridged type of network that can communicate with each other, but the
operations in other Ubuntu versions.
Currently, only 64-bit Docker installation packages are available in Ubuntu. If you want to run 32-bit Docker, you need to use the source code to compile the 32-bit Docker tool.Install Docker
Installing Docker with apt-get is a piece of
1. Docker Container Restart policy
The restart policy for Docker containers is a start-up strategy for production environments that can be ignored during the development process.
Docker container restarts are done by the Docker da
in the figure).By default, containers on the same Docker host can communicate with each other through their IP addresses. If you need to communicate through the host name of the container, you must set up link between the containers.HostWhen the container is started, parameters are used --network="host" . In this mode, the c
have any special suggestions for the best size of the metadata pool, but 1% of the data pool looks good.Just like before, stop Docker, remove its data directory, and then create a /dev/mapper symbolic link to the device and restart Docker.If you need more knowledge about LVM, see the LVM howto here.Expansion containerBy default, if you use Device Mapper's storage plug-in, all images and containers are created from an initial 10G file system. Let's lo
first
[root@201 ~]# rpm-q epel-release
epel-release-6-8.noarch
OK, we have installed Epel, then Yum, wait a moment to install successfully
[root@201 ~]# Yum Install docker-io-y
If the system is CentOS 7 then the above steps are not necessary and the installation package is Docker instead of Docker-io
[root@201 ~]# Yum Install
Reprint please indicate the source: http://blog.csdn.net/dongdong9223/article/details/52998375This article comes from "I'm a Fish's blog" 1 start Docker service
First you need to know that the start Docker service is:
Service Docker
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.