Configuration accelerator
Configuration Accelerator: unbuto x64 docker inside the / etc / Docker /
{
"Registry-Mirrors": [
"https://docker.mirrors.ustc.edu.cn"
]
}
unbuto x64-Docker inside the / etc / Docker /
{
" Mirrors-Registry ": [
" https://registry.docker-cn.com "
]
}
Basic Operations
docker pull **: pull mirroring
docker pull [options] [Docker Registry address [: Port Number] /] warehouse name [: label] ([] do not write the content inside optional)
Docker RUN - the p-8080: 8080 Tomcat: run-time image of the container port: the port mirroring
Docker Expediting IT --rm rUN \
Docker bulid: Construction mirroring
Run-time image
$ docker run -it --rm \
ubuntu:16.04 \
bash
root@e7009c6ce357:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.4 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
Explanation
docker run
Is the command to run the container, here we briefly explain the parameters used above.
-it
: These are two parameters, a is-i
: interactive operation, one is-t
terminal. We intend to enter herebash
to execute commands and return the results to see, so we need interactive terminals.--rm
: This parameter is to say after the vessel exit will be deleted. By default, the demand for troubleshooting, exit the container does not delete immediately, unless manuallydocker rm
. We are here only just execute a command, look at the results, does not require troubleshooting and retention results, so use--rm
to avoid wasting space.ubuntu:16.04
: This is aubuntu:16.04
mirror image basis starting container.bash
: The image name is placed in command, here we want to have an interactive Shell, so use isbash
.
After entering the container, we can operate under the Shell, execute any desired command. Here, we have implemented cat /etc/os-release
, which is commonly used Linux command to view the current version of the system, from the returned results can be seen within the container is a Ubuntu 16.04.4 LTS
system.
By the end we exit
pulled out of the container.