sudo apt-get update
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
apt-cache policy docker-engine
docker-engine: Installed: (none) Candidate: 1.11.1-0~xenial Version table: 1.11.1-0~xenial 500 500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages 1.11.0-0~xenial 500 500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
sudo apt-get install -y docker-engine
sudo systemctl status docker
Output ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2016-05-01 06:53:52 CDT; 1 weeks 3 days ago Docs: https://docs.docker.com Main PID: 749 (docker)
Output docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?. See 'docker run --help'.
sudo usermod -aG docker $(whoami)
sudo usermod -aG docker username
docker [option] [command] [arguments]
Output attach Attach to a running container build Build an image from a Dockerfile commit Create a new image from a container's changes cp Copy files/folders between a container and the local filesystem create Create a new container diff Inspect changes on a container's filesystem events Get real time events from the server exec Run a command in a running container export Export a container's filesystem as a tar archive history Show the history of an image images List images import Import the contents from a tarball to create a filesystem image info Display system-wide information inspect Return low-level information on a container or image kill Kill a running container load Load an image from a tar archive or STDIN login Log in to a Docker registry logout Log out from a Docker registry logs Fetch the logs of a container network Manage Docker networks pause Pause all processes within a container port List port mappings or a specific mapping for the CONTAINER ps List containers pull Pull an image or a repository from a registry push Push an image or a repository to a registry rename Rename a container restart Restart a container rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save one or more images to a tar archive search Search the Docker Hub for images start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop a running container tag Tag an image into a repository top Display the running processes of a container unpause Unpause all processes within a container update Update configuration of one or more containers version Show the Docker version information volume Manage Docker volumes wait Block until a container stops, then print its exit code
docker docker-subcommand --help
docker info
docker run hello-world
Output Hello from Docker. This message shows that your installation appears to be working correctly. ...
docker search ubuntu
Output NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating s... 3808 [OK] ubuntu-upstart Upstart is an event-based replacement for ... 61 [OK] torusware/speedus-ubuntu Always updated official Ubuntu docker imag... 25 [OK] rastasheep/ubuntu-sshd Dockerized SSH service, built on top of of... 24 [OK] ubuntu-debootstrap debootstrap --variant=minbase --components... 23 [OK] nickistre/ubuntu-lamp LAMP server on Ubuntu 6 [OK] nickistre/ubuntu-lamp-wordpress LAMP on Ubuntu with wp-cli installed 5 [OK] nuagebec/ubuntu Simple always updated Ubuntu docker images... 4 [OK] nimmis/ubuntu This is a docker images different LTS vers... 4 [OK] maxexcloo/ubuntu Docker base image built on Ubuntu with Sup... 2 [OK] admiringworm/ubuntu Base ubuntu images based on the official u... 1 [OK] ...
docker pull ubuntu
docker run ubuntu
docker images
Output REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu latest c5f1cf30c96b 7 days ago 120.8 MB hello-world latest 94df4f0ce8a4 2 weeks ago 967 B
docker run -it ubuntu
Output root@d9b100f2f636:/#
apt-get update
apt-get install -y nodejs
docker commit -m "What did you do to the image" -a "Author Name" container-id repository/new_image_name
docker commit -m "added node.js" -a "Sunday Ogwu-Chinuwa" d9b100f2f636 finid/ubuntu-nodejs
Output finid/ubuntu-nodejs latest 62359544c9ba 50 seconds ago 206.6 MB ubuntu latest c5f1cf30c96b 7 days ago 120.8 MB hello-world latest 94df4f0ce8a4 2 weeks ago 967 B
Output CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f7c79cc556dd ubuntu "/bin/bash" 3 hours ago Up 3 hours silly_spence
docker ps -a
docker ps -l
docker stop container-id
docker login -u docker-registry-username
docker push docker-registry-username/docker-image-name
Output The push refers to a repository [docker.io/finid/ubuntu-nodejs] e3fbbfb44187: Pushed 5f70bf18a086: Pushed a3b5c80a4eba: Pushed 7f18b442972b: Pushed 3ce512daaf78: Pushed 7aae4540b42d: Pushed ..
Output The push refers to a repository [docker.io/finid/ubuntu-nodejs] e3fbbfb44187: Preparing 5f70bf18a086: Preparing a3b5c80a4eba: Preparing 7f18b442972b: Preparing 3ce512daaf78: Preparing 7aae4540b42d: Waiting unauthorized: authentication required
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有