http://blog.csdn.net/kunloz520/article/details/53839237
At the beginning of this article, we are going to get to the point where we officially start our Docker, and use it.
First, the first command we're going to introduce is also the most central command of Docker:
implemented on-line. Below I post the package plugin code in the POM:Note the changes in ENV nodes and entrypointCom.spotifydocker-maven-plugin0.4.11pumelo/${project.artifactid}-${version}frolvlad/alpine-oraclejdk8:slim "" [" SH ","-C "," Java $JAVA _opts-jar/${project.build.finalname}.jar "]/${project.build.directory}${ Project.build.finalname}.jarTestAfter the image is newly packaged, runDocker run-e java_opts= '-xms128m-xmx256m-dspring.profiles.active=prod '-it pumelo/test-1.0.0/bin/bashThis
Tags: cal create log ROR ALC etc system Linux andRun "systemctl start Docker.service" ErrorJob for Docker.service failed because the control process exited with error code. See "Systemctl Status Docker.service" and "Journalctl-xe" for details. 'Run ' Docker ps ' ERROR 'Cannot connect to the Docker daemon at Unix:///var/run/docker.sock. Is the
#创建docker组 [email protected]:~'docker' already exists# Join the current user to the Docker group [email protected]:~$ sudo gpasswd-a ${user} dockeradding user Weiyj to group docker# restart Docker Service [EM AIL protected]:~$ sudo service
public docker database, use the build parameter. The parameter [.] is the configuration file. Click,Dockerfile
dockerbuild-tNEW_Images.
7. Build the container according to dockerfile in the current directory [this command applies to creating httpd or nginx services in a container, and publish the ing ports under-P.]
docker run -i -t - p 2013:80
Run a container
Attach Attachment Container
Attach can only be used for interactive containers, not for background containers, when we start an interactive container with Docker start or Docker restart, the container is interactive but the container does not have a terminal associated with it. This allows the attach
See all images
sudo docker images
Generate container
sudo docker run-it--net=host-v/home/tingting/dropbox/code/craterdetection/docker:/root/with an image Workspace Tingting/caffe:version1 Bash
Open Jupyter Notebook
Jupyter Notebook
In the browser, type: localhost:8890It is important to
Recently encountered a problem in the work, at the beginning of the execution of the docker daemon command will always error cause process stop, follow the online method to /etc/fstab add a row in the file
None /sys/fs/cgroup cgroup defaults 0 0
Docker daemonyou can get up now, but with a new problem-the do
Download a docker imageDocker Pull CentOS
Run an image interactivelyDocker Run-t-I Centos/bin/bash
Delete a mirrorDocker imagesDocker rmi "Image ID"If the image cannot be deleted, the container that uses the mirror is stopped
To view a running containerDocker PS
View containers that have exitedDocker Ps-a
Delete a containerDocker RM "Container ID"
Search IP AddressIP addr
Create your own image using the Dockerfile commanddockerbuild-tcen
Results
total 24drwxr-xr-x 2 root root 4096 Jun 23 16:24 .drwxr-xr-x 3 root root 4096 Jun 23 15:30 ..-rw-r--r-- 1 root root 1 Jun 23 15:42 index.html-rw-r--r-- 1 root root 215 Jun 23 16:24 index.php
Using PHP./index.phpSystem ("sudo docker ...") is capable of executingcannot be performed with browser access
Reply content:
Results
total 24drwxr-xr-x 2 root root 4096 Jun 23 16:24 .drwxr-xr-x 3 root root 4096 Jun 23 15:30 ..-rw-r--r-- 1 r
, so it may also have multiple, so we can create one, notice that color here is for display, and Graph Item type is the type of display, For example, area is displayed as a block, Text format is to give this output a name
Once created, if you want to create a legend for this output, then add to the graph item type->legend, notice that the graph item inputs above is created automatically, usually without processing, to this, graph The templates has been completed and is then applied.
6 A
=[]
Reads from the specified file into the environment variable;
--cpuset= "0-2" or--cpuset= "0,1,2"
Binds the container to the specified CPU to run;
--net= "Bridge"
Specifies the network connection type of the container, supports bridge/Host/noneFour types of container:
The adb shell pm command is first recognized, and the auto-start command of the application is forbidden. The adbpm command
Many people on the Forum wanted to cancel the auto-start startup of the application, so they wanted to know how it was implemented. However, Baidu once
I. OverviewThere are two ways to create a mirror, one with the commit command, and the second with the Dockerfile method (which is more commonly described in the following article). This chapter describes the commit method.Before we introduce the commit command, we review the versioning of the code, and when we change the code, we commit to the version server.For a container-like concept, the commit
Open/Stop/restartTo view a container that is currently runningDocker PSView all containers that have been stoppedDocker Ps-aDisplays a container that is up to dateDocker Ps-lCreate a new container to runDocker runStart a containerDocker Run Close a containerDocker Stop Restart a containerDocker Restart Connect to a container that is in Operation--sig-proxy=falseDocker Attach--sig-proxy=false View the underlying information for an image or containerDocker Inspect--format= ' {{}} ' Delete Containe
123456789Ten One A - - the - - - + - + A at - - - - - in - to + -
Usage:dockerrun[OPTIONS]IMAGE[COMMAND][ARG...]-a,--attach=[]登录容器(以dockerrun-d启动的容器)-c,--cpu-shares=0设置容器CPU权重,在CPU共享场景使用--cap-add=[]添加权限,权限清单详见:http://linux.die.net/man/7/capabilities--cap-drop=[]删除权限,权限清单详见:http://linux.die.net/man/7/capabilities--cidfile=""运行容器后,在指定文件中写入容器PID值,一种典型的监控系统用法--cpuset=""设置容器可以使用哪些CPU,此参数可以用来容器独占CPU-d,--detach=false指定容器运行于前台还是后台--device=[]添加主机设备给容器,相当于设
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.