Docker source server logout log out from a Docker registry server # Exit from the current Docker registry Logs Fetch the logs of a container # Output current container log information port Lookup the public-facing port which is
Nat-ed to Private_port # View the container internal source port corresponding to the mapping port pause pause all processes within
View containers
sudo docker ps [-a ]|[ -l]
-A: List all containers.-L list the newly created container
CONTAINER IDUnique ID created during container startupNAMEName of the automatically created container
sudo docker inspect CONTAINER ID or NAME
Check containers
Custom container name
Sudo docker run -- name = name-I-t ubuntu/bin/bash
server for Docker to use:
Log into the system as a user identity sudo .
Open /etc/default/docker file editing.
Add a setting.
DOCKER_OPTS="--dns 8.8.8.8"Use a local DNS server, such as 192.168.1.1 replace 8.8.8.8 . You can also specify multiple DNS servers. Separate them with a space. For example:--dns8.8.8.8--dns192.168.1.1警告:如果你正在使用连接多个网络的电脑做这个事情,确定要选择一个公共DNS服务器。
Save and c
syntax asFor example, Docker run--name centosrongqi-i-T centos/bin/Bash-I: Open the stdin in the container-T: Assigning a pseudo-TTY terminal boot container to a container: Docker start container name/container ID View container: Docker PS-a indicates which containers have been run Docker commit-M"Description"-A"Sayma
innovations on this issue. This is the most unique part of docker.Deployment on centos
1. Install and add service and self-startup items
[Root @ localhost ~] # Yum install docker
[Root @ localhost ~] # Systemctl start docker. service
[Root @ localhost ~] # Systemctl enable docker. service
2. Several Common docker com
1. Set Boot upIf you want Docker-to-start at boot, you should also:$ sudo systemctl enable docker2. Start, stop, restart$ sudo systemctl start docker$ sudo systemctl stop Docker$ sudo systemctl restart Docker3. Turn on local and remoteModify the/etc/sysconfig/
verification probably failed due to aProblem with the certificate (it might is expired, or the name mightA. Not match the domain name in the URL).If you ' d like to turn off Curl's verification of the certificate, useThe-k (or--insecure) option.15.Because it is a certificate that is used without any certification authority certification, and you have not applied your own generated certificate locally. Therefore, you will be prompted to use an unauthenticated certificate, you can makeThe "-k" op
supports a yml extension file, which records the configuration information of one or more containers you want to create so that you can distribute YML files to different machines and create containers through Docker-compoe.About Docker SwarmDocker swarm is used to manage Docker clusters, and when we deploy a service, we usually consider that the service will not
Where the [] Enclosed as optionalDocker version View the release number of Docker, including client, server, dependent go, etc.Docker Info View System (Docker) level information, including managed images, containers number, etc.Docker search Docker pull Docker push Docker Pu
, And the docker startdocker ps-a container is started to view all containers including stopped containers. Docker start id
1.2 daemon running
Docker containers run in Daemonized mode in the background. In this case, you can add the-d ParameterNumber.
[root@bfd-v7 ~]# docker run -d ubuntu:12.04 /bin/sh -c "while true;
the opportunity to continue to further study.
Attach: Add Docker user group, avoid sudo input
After the default installation of Docker, each execution Docker need to run sudo command, affecting efficiency. If you do not follow sudo, direct execution of the Docker Images command will have the following problems:Get H
' >> /etc/rc.localHow to enter the server in docker
If you are using Docker 1.3.0 or later, run the following command:
docker exec -it gitlab bash
To use an older version, run the following command:
docker run --rm --volume=/usr/local/bin:/target jpetazzo/nsentersudo docker
container users.To enable the steps:
Modify the/etc/default/docker file to add line docker_opts= "--userns-remap=default"
Restart the Docker service, at which point the dockerd process is/usr/bin/dockerd--userns-remap=default--raw-logs
Then create a container: Docker run-d-v/bin:/host/bin--name web35
detailed problem is not found yet, so I will try again later. We can see the results after docker ps. Normally, the port is displayed as shown in the following figure. If a problem occurs, the port is not displayed as follows: 0.0.0.0: 9200-> 9200/tcp, 0.0.0.0: 9300-> 9300/tcp, but 9200/tcp, 9300/tcp.
Kibana
docker run -dit --name kibana --hostname kibana-host -v /data:/data -p 5601:5601 -e ELASTICS
to run the sudo command, which affects efficiency. If you do not follow sudo, direct execution of the Docker Images command will have the following problems:Get http:///var/run/docker.sock/v1.18/images/json:dial Unix/var/run/docker.sock:permission denied. is trying to connect to a tls-enabled daemon without TLS?Adding the current user execution permissions to the appropriate Docker user group will solve th
container, and we used a similar usage before:
$ sudo docker run -t -i ubuntu:14.04 /bin/bash
It can then be manipulated in the context of the container.
When you use Docker run, the following things happen:
Checks if there is a specified image locally and does not exist to download from the public repository
Create and start a container with mirroring
Assign a file system and mount a layer of
This machine installs a Docker, the remote host installs a Docker, this article mainly explains how to use the local Docker client to access the remote host's Docker daemon
By default, the Docker daemon generates a socket (/var/run/docker.sock) file for local process communi
/docker.sock/v1.18/images/json:dial Unix/var/run/docker.sock:permission denied. is trying to connect to a tls-enabled daemon without TLS?Adding the current user execution permissions to the appropriate Docker user group will solve this problem.Add a new Docker user groupsudo groupadd Docker# Add current user to 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.