csphere/mysql:5.5#docker run-d-P--name web2--link db1:db1 csphere/php-fpm:5.4 (previous DB1 is the database container name, followed by an alias)#docker exec-it Web2/bin/bash[Email protected]/]# more/etc/hosts172.17.0.12c209d4c8b215127.0.0.1localhost:: 1localhost ip6-localhost ip6-loopbackfe00::0ip6-localnetff00::0Ip6-mcastprefixFf02::1Ip6-allnodesFf02::2ip6-allrouters172.17.0.11db1 4b490b7dcde9[[email pro
Tags: bin local com path manage min bubuko Environment Common examplesJust came to the company, with the company test Environment Project Server, the environment is Linux Centos7.2 all tomcat are mounted under the Docker container, so also learned some simple docker instructions (Learn what is docker before learning, and will be commonly used Linux instructions).
Common docker command Directories
Search for images
Get container Image
Create an instance
View the container list
Create an image
Remove one or more container instances
Delete an image
Search for images
Search for images from docker hub.Comand: $ sudo docker search TERM
Options:
-- Automatically = false:
Hello WorldUse[docker run]命令在docker container中运行应用程序docker run fedora, use the image of fedora to start a container/bin/echo ‘hello world‘, the executable command in Fedora, output "Hello World"Interactive container# docker Run-t-I fedora/bin/bashbash-4.3#-tIn container, assign a terminal-iCreate an interactive connect
devicemapper
The landlord uses the following commands:
It's still not working.
root@syx-vb:~# Service Docker Restart
root@syx-vb:~# Docker version
root@syx-vb:~# Docker version
Client Version:1.7.0-dev
Client API version:1.19 Go
version (client): go1.4.2
Git commit (client): 9234460
OS
Hello WorldUse[docker run]命令在docker container中执行应用程序docker run fedora, use the image of fedora to start a container/bin/echo ‘hello world‘, a command that can be run in fedora, output "Hello World"Interactive container# docker Run-t-I fedora/bin/bashbash-4.3#-tIn container, assign a terminal-iCreate an interactive conn
7 commands to deploy Mesos clusters in DockerAll of the Docker container build files that are used are also available. You can build each container locally or use only the containers that are pre-built at the Docker hub. The following command will automatically download the required pre-built container for your service.ZooKeeper?—? https://registry.hub.docker.com
The previous section learned and practiced the foundation and installation of Docker, and this section mainly studies the main concepts and commands of Docker
Docker has three core concepts: Mirroring, container, warehouse one, mirroring
Docker mirroring is a precondition fo
The Docker EXEC command is capable of executing commands in a running container. Use format for Docker EXEC commands: Docker exec [OPTIONS] container_name command [ARG ...]
Options Description:
-D, execute the command in the background;
-E, setting environment variables
Common Docker commands
The detailed explanation of Docker commonly used name, let you quickly learn Docker use!
Docker, lightweight virtual machines, also known as application containers
Advantages: 1, fast deployment 2, testing services and deployment can be maintained i
registration is successful, the user's authentication information will be saved in the. Dockercfg of the local user directory. These mirrored resources can be divided into two categories, depending on whether they are officially provided. One is a base image like CentOS, called the base or root image. These images are created, validated, supported, and provided by Docker. Such images tend to use a single word as their name. There is also a type, such
Docker is becoming more and more popular, and if your team is ready to start using Docker, then a private repository is essential, first of all to help you speed up the pull image from the server, and, second, to help you store a private image. This article is about how to open a images backup from a public server to a local private server.Docker images often fills the hard disk space unconsciously, in orde
Each parameter represents what it means, at the bottom of the text.#搜索名称含有centos的镜像Docker Search CentOS#查看当前系统拥有的镜像Docker images#获取名称为centos的镜像Docker Pull CentOS#删除名称为centos的镜像Docker RMI CentOS#强制删除名称为centos的镜像Docker Rmi-f CentOS#使用centos镜像运行一个容器, the echo command is execute
# Dependencies between services to control the service startup sequence. Normally, the service is started in order.
Depends_on
# Custom DNS server, which can be a single value or list
DNS
# Override entrypoin
Entrypoint
# Add an environment variable from a file, which can be a single value or a list
Env_file
# Add environment variables, which can be arrays or dictionaries. Boolean values are enclosed in qu
Docker Common CommandsFirst, view the running containerDocker PSSecond, view all the containers that are runningDocker Ps-aThird, enter the containerWhere the character is the container ID:Docker exec-it D27bd3008ad9/bin/bashIv. Disabling a single containerDocker Stop D27BD3008AD9Five. Deactivate all running containers:Docker stop $ (Docker ps-q)Vi. Remove all containers:Docker RM $ (
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.