亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Compose About versions and upgrading (Compose) ASP.NET Core + SQL Server on Linux (Compose) CLI environment variables (Compose) Command-line completion (Compose) Compose(組成) Compose command-line reference(組合命令行參考) Control startup order (Compose) Django and PostgreSQL (Compose) Docker stacks and distributed application bundles (Compose) docker-compose build(docker-compose構(gòu)建) docker-compose bundle docker-compose config docker-compose create docker-compose down docker-compose events docker-compose exec docker-compose help docker-compose images docker-compose kill docker-compose logs docker-compose pause docker-compose port docker-compose ps docker-compose pull docker-compose push docker-compose restart docker-compose rm docker-compose run docker-compose scale docker-compose start docker-compose stop docker-compose top docker-compose unpause docker-compose up Environment file (Compose) Environment variables in Compose Extend services in Compose Frequently asked questions (Compose) Getting started (Compose) Install Compose Link environment variables (deprecated) (Compose) Networking in Compose Overview of Docker Compose Overview of docker-compose CLI Quickstart: Compose and WordPress Rails and PostgreSQL (Compose) Sample apps with Compose Using Compose in production Using Compose with Swarm Engine .NET Core application (Engine) About images, containers, and storage drivers (Engine) Add nodes to the swarm (Engine) Apply custom metadata (Engine) Apply rolling updates (Engine) apt-cacher-ng Best practices for writing Dockerfiles (Engine) Binaries (Engine) Bind container ports to the host (Engine) Breaking changes (Engine) Build your own bridge (Engine) Configure container DNS (Engine) Configure container DNS in user-defined networks (Engine) CouchDB (Engine) Create a base image (Engine) Create a swarm (Engine) Customize the docker0 bridge (Engine) Debian (Engine) Default bridge network Delete the service (Engine) Deploy a service (Engine) Deploy services to a swarm (Engine) Deprecated Engine features Docker container networking (Engine) Docker overview (Engine) Docker run reference (Engine) Dockerfile reference (Engine) Dockerize an application Drain a node (Engine) Engine FAQ (Engine) Fedora (Engine) Get started (Engine) Get started with macvlan network driver (Engine) Get started with multi-host networking (Engine) How nodes work (Engine) How services work (Engine) Image management (Engine) Inspect the service (Engine) Install Docker (Engine) IPv6 with Docker (Engine) Join nodes to a swarm (Engine) Legacy container links (Engine) Lock your swarm (Engine) Manage nodes in a swarm (Engine) Manage sensitive data with Docker secrets (Engine) Manage swarm security with PKI (Engine) Manage swarm service networks (Engine) Migrate to Engine 1.10 Optional Linux post-installation steps (Engine) Overview (Engine) PostgreSQL (Engine) Raft consensus in swarm mode (Engine) Riak (Engine) Run Docker Engine in swarm mode Scale the service (Engine) SDKs (Engine) Select a storage driver (Engine) Set up for the tutorial (Engine) SSHd (Engine) Storage driver overview (Engine) Store service configuration data (Engine) Swarm administration guide (Engine) Swarm mode key concepts (Engine) Swarm mode overlay network security model (Engine) Swarm mode overview (Engine) Understand container communication (Engine) Use multi-stage builds (Engine) Use swarm mode routing mesh (Engine) Use the AUFS storage driver (Engine) Use the Btrfs storage driver (Engine) Use the Device mapper storage driver (Engine) Use the OverlayFS storage driver (Engine) Use the VFS storage driver (Engine) Use the ZFS storage driver (Engine) Engine: Admin Guide Amazon CloudWatch logs logging driver (Engine) Bind mounts (Engine) Collect Docker metrics with Prometheus (Engine) Configuring and running Docker (Engine) Configuring logging drivers (Engine) Control and configure Docker with systemd (Engine) ETW logging driver (Engine) Fluentd logging driver (Engine) Format command and log output (Engine) Google Cloud logging driver (Engine) Graylog Extended Format (GELF) logging driver (Engine) Journald logging driver (Engine) JSON File logging driver (Engine) Keep containers alive during daemon downtime (Engine) Limit a container's resources (Engine) Link via an ambassador container (Engine) Log tags for logging driver (Engine) Logentries logging driver (Engine) PowerShell DSC usage (Engine) Prune unused Docker objects (Engine) Run multiple services in a container (Engine) Runtime metrics (Engine) Splunk logging driver (Engine) Start containers automatically (Engine) Storage overview (Engine) Syslog logging driver (Engine) tmpfs mounts Troubleshoot volume problems (Engine) Use a logging driver plugin (Engine) Using Ansible (Engine) Using Chef (Engine) Using Puppet (Engine) View a container's logs (Engine) Volumes (Engine) Engine: CLI Daemon CLI reference (dockerd) (Engine) docker docker attach docker build docker checkpoint docker checkpoint create docker checkpoint ls docker checkpoint rm docker commit docker config docker config create docker config inspect docker config ls docker config rm docker container docker container attach docker container commit docker container cp docker container create docker container diff docker container exec docker container export docker container inspect docker container kill docker container logs docker container ls docker container pause docker container port docker container prune docker container rename docker container restart docker container rm docker container run docker container start docker container stats docker container stop docker container top docker container unpause docker container update docker container wait docker cp docker create docker deploy docker diff docker events docker exec docker export docker history docker image docker image build docker image history docker image import docker image inspect docker image load docker image ls docker image prune docker image pull docker image push docker image rm docker image save docker image tag docker images docker import docker info docker inspect docker kill docker load docker login docker logout docker logs docker network docker network connect docker network create docker network disconnect docker network inspect docker network ls docker network prune docker network rm docker node docker node demote docker node inspect docker node ls docker node promote docker node ps docker node rm docker node update docker pause docker plugin docker plugin create docker plugin disable docker plugin enable docker plugin inspect docker plugin install docker plugin ls docker plugin push docker plugin rm docker plugin set docker plugin upgrade docker port docker ps docker pull docker push docker rename docker restart docker rm docker rmi docker run docker save docker search docker secret docker secret create docker secret inspect docker secret ls docker secret rm docker service docker service create docker service inspect docker service logs docker service ls docker service ps docker service rm docker service scale docker service update docker stack docker stack deploy docker stack ls docker stack ps docker stack rm docker stack services docker start docker stats docker stop docker swarm docker swarm ca docker swarm init docker swarm join docker swarm join-token docker swarm leave docker swarm unlock docker swarm unlock-key docker swarm update docker system docker system df docker system events docker system info docker system prune docker tag docker top docker unpause docker update docker version docker volume docker volume create docker volume inspect docker volume ls docker volume prune docker volume rm docker wait Use the Docker command line (Engine) Engine: Extend Access authorization plugin (Engine) Docker log driver plugins Docker network driver plugins (Engine) Extending Engine with plugins Managed plugin system (Engine) Plugin configuration (Engine) Plugins API (Engine) Volume plugins (Engine) Engine: Security AppArmor security profiles for Docker (Engine) Automation with content trust (Engine) Content trust in Docker (Engine) Delegations for content trust (Engine) Deploying Notary (Engine) Docker security (Engine) Docker security non-events (Engine) Isolate containers with a user namespace (Engine) Manage keys for content trust (Engine) Play in a content trust sandbox (Engine) Protect the Docker daemon socket (Engine) Seccomp security profiles for Docker (Engine) Secure Engine Use trusted images Using certificates for repository client verification (Engine) Engine: Tutorials Engine tutorials Network containers (Engine) Get Started Part 1: Orientation Part 2: Containers Part 3: Services Part 4: Swarms Part 5: Stacks Part 6: Deploy your app Machine Amazon Web Services (Machine) Digital Ocean (Machine) docker-machine active docker-machine config docker-machine create docker-machine env docker-machine help docker-machine inspect docker-machine ip docker-machine kill docker-machine ls docker-machine provision docker-machine regenerate-certs docker-machine restart docker-machine rm docker-machine scp docker-machine ssh docker-machine start docker-machine status docker-machine stop docker-machine upgrade docker-machine url Driver options and operating system defaults (Machine) Drivers overview (Machine) Exoscale (Machine) Generic (Machine) Get started with a local VM (Machine) Google Compute Engine (Machine) IBM Softlayer (Machine) Install Machine Machine Machine CLI overview Machine command-line completion Machine concepts and help Machine overview Microsoft Azure (Machine) Microsoft Hyper-V (Machine) Migrate from Boot2Docker to Machine OpenStack (Machine) Oracle VirtualBox (Machine) Provision AWS EC2 instances (Machine) Provision Digital Ocean Droplets (Machine) Provision hosts in the cloud (Machine) Rackspace (Machine) VMware Fusion (Machine) VMware vCloud Air (Machine) VMware vSphere (Machine) Notary Client configuration (Notary) Common Server and signer configurations (Notary) Getting started with Notary Notary changelog Notary configuration files Running a Notary service Server configuration (Notary) Signer configuration (Notary) Understand the service architecture (Notary) Use the Notary client
characters

描述

從注冊(cè)表中提取圖像或存儲(chǔ)庫(kù)

用法

docker pull [OPTIONS] NAME[:TAG|@DIGEST]

選項(xiàng)

名稱,簡(jiǎn)寫

默認(rèn)

描述

--all-tags,-a

false

下載存儲(chǔ)庫(kù)中的所有標(biāo)記圖像

--disable-content-trust

true

跳過圖像驗(yàn)證

父命令

命令

描述

docker

Docker CLI的基本命令。

擴(kuò)展描述

大部分圖像將在Docker Hub注冊(cè)表的基礎(chǔ)圖像上創(chuàng)建。

Docker Hub包含許多預(yù)構(gòu)建的圖像,您無需定義和配置自己的圖像即可進(jìn)行嘗試pull

要下載特定圖像或一組圖像(即存儲(chǔ)庫(kù)),請(qǐng)使用docker pull

代理配置

如果你是后面的HTTP代理服務(wù)器,例如在公司的設(shè)置,前打開一個(gè)連接到注冊(cè)表,您可能需要配置多克守護(hù)進(jìn)程的代理設(shè)置,使用HTTP_PROXY,HTTPS_PROXYNO_PROXY環(huán)境變量。要在使用的主機(jī)上設(shè)置這些環(huán)境變量systemd,請(qǐng)參閱控制并使用systemd配置Docker以獲取變量配置。

并發(fā)下載

默認(rèn)情況下,Docker守護(hù)進(jìn)程將一次拉出三層圖像。如果您使用的是低帶寬連接,則可能會(huì)導(dǎo)致超時(shí)問題,您可能需要通過--max-concurrent-downloads守護(hù)進(jìn)程選項(xiàng)降低此問題。有關(guān)更多詳細(xì)信息,請(qǐng)參閱守護(hù)程序文檔。

實(shí)例

從Docker Hub中提取圖像

要下載特定圖像或一組圖像(即存儲(chǔ)庫(kù)),請(qǐng)使用docker pull。如果未提供標(biāo)簽,則Docker Engine將該:latest標(biāo)簽用作默認(rèn)標(biāo)簽。該命令會(huì)拉出debian:latest圖像:

$ docker pull debian

Using default tag: latest
latest: Pulling from library/debian
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:e7d38b3517548a1c71e41bffe9c8ae6d6d29546ce46bf62159837aad072c90aa
Status: Downloaded newer image for debian:latest

Docker映像可以由多個(gè)圖層組成。在上面的例子中,圖像由兩層組成,fdd5d7827f33a3ed95caeb02。

圖層可以重復(fù)使用圖層。例如,debian:jessie圖像與兩個(gè)圖層共享debian:latest。debian:jessie因此,拉取圖像只會(huì)拉取其元數(shù)據(jù),而不是其圖層,因?yàn)樗袌D層都已經(jīng)存在于本地:

$ docker pull debian:jessie

jessie: Pulling from library/debian
fdd5d7827f33: Already exists
a3ed95caeb02: Already exists
Digest: sha256:a9c958be96d7d40df920e7041608f2f017af81800ca5ad23e327bc402626b58e
Status: Downloaded newer image for debian:jessie

要查看本地存在哪些圖像,請(qǐng)使用以下docker images命令:

$ docker images

REPOSITORY   TAG      IMAGE ID        CREATED      SIZE
debian       jessie   f50f9524513f    5 days ago   125.1 MB
debian       latest   f50f9524513f    5 days ago   125.1 MB

Docker使用內(nèi)容可尋址的圖像存儲(chǔ),圖像ID是一個(gè)涵蓋圖像配置和圖層的SHA256摘要。在上面的例子中,debian:jessie并且debian:latest具有相同的圖像ID,因?yàn)樗鼈儗?shí)際上是用不同名稱標(biāo)記的相同圖像。由于它們是相同的圖像,因此它們的圖層只能存儲(chǔ)一次,并且不會(huì)占用額外的磁盤空間。

有關(guān)圖像,圖層和內(nèi)容尋址存儲(chǔ)的更多信息,請(qǐng)參閱了解圖像,容器和存儲(chǔ)驅(qū)動(dòng)程序。

通過digest(不可變標(biāo)識(shí)符)提取圖像

到目前為止,您已經(jīng)通過名稱(和“tag”)來拉取圖片。使用名稱和標(biāo)簽是處理圖像的便捷方式。使用標(biāo)簽時(shí),您可以docker pull再次使用圖片,以確保您擁有該圖片的最新版本。例如,docker pull ubuntu:14.04拉取最新版本的Ubuntu 14.04映像。

在某些情況下,您不希望將圖像更新為新版本,但更喜歡使用固定版本的圖像。Docker使您能夠通過摘要來提取圖像。當(dāng)通過拉動(dòng)摘要的圖像,你指定確切的圖像的版本,拉其。這樣做,可讓您將圖像“釘”到該版本,并確保您使用的圖像始終保持不變。

要知道圖像的摘要,請(qǐng)先拉取圖像。讓我們ubuntu:14.04從Docker Hub中提取最新的圖像:

$ docker pull ubuntu:14.0414.04: Pulling from library/ubuntu
5a132a7e7af1: Pull complete
fd2731e4c50c: Pull complete
28a2f68d1120: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
Status: Downloaded newer image for ubuntu:14.04

在pull完成后,Docker會(huì)打印圖像的摘要。在上面的例子中,圖像的摘要是:

sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2

送到注冊(cè)表時(shí),Docker還會(huì)打印圖像的摘要。如果您想固定您剛剛推送的圖像版本,這可能會(huì)很有用。

當(dāng)摘取圖片時(shí)摘要代替標(biāo)簽,例如,通過摘要拉出上面的圖片,運(yùn)行以下命令:

$ docker pull ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2

sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2: Pulling from library/ubuntu
5a132a7e7af1: Already exists
fd2731e4c50c: Already exists
28a2f68d1120: Already exists
a3ed95caeb02: Already exists
Digest: sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
Status: Downloaded newer image for ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2

摘要也可以在FROMDockerfile中使用,例如:

FROM ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
MAINTAINER some maintainer <maintainer@example.com>

注意:使用此功能可以及時(shí)將圖像“釘”到特定版本。因此,Docker不會(huì)提取圖像的更新版本,其中可能包含安全更新。如果你想拉一個(gè)更新的圖像,你需要相應(yīng)地更改摘要。

從不同的注冊(cè)表中提取

默認(rèn)情況下,docker pull從Docker Hub中提取圖像。也可以手動(dòng)指定要從中注冊(cè)的注冊(cè)表路徑。例如,如果您已設(shè)置本地注冊(cè)表,則可以指定其路徑以從中取消注冊(cè)。注冊(cè)表路徑類似于URL,但不包含協(xié)議說明符(https://)。

以下命令testing/test-image從偵聽端口5000(myregistry.local:5000)的本地注冊(cè)表中獲取圖像:

$ docker pull myregistry.local:5000/testing/test-image

注冊(cè)表憑證由docker登錄管理。

Docker使用https://協(xié)議與注冊(cè)表進(jìn)行通信,除非允許通過不安全的連接訪問注冊(cè)表。有關(guān)更多信息,請(qǐng)參閱不安全的注冊(cè)表部分。

使用多個(gè)圖像拉取一個(gè)存儲(chǔ)庫(kù)

默認(rèn)情況下,docker pull拉一從注冊(cè)表圖像。存儲(chǔ)庫(kù)可以包含多個(gè)圖像。要從存儲(chǔ)庫(kù)中提取所有圖像,請(qǐng)?jiān)谑褂脮r(shí)提供-a(或--all-tags)選項(xiàng)docker pull。

此命令從fedora儲(chǔ)存庫(kù):

$ docker pull --all-tags fedora

Pulling repository fedora
ad57ef8d78d7: Download complete
105182bb5e8b: Download complete
511136ea3c5a: Download complete
73bd853d2ea5: Download complete....Status: Downloaded newer image for fedora

拉動(dòng)完成后,使用該docker images命令查看拉出的圖像。以下示例顯示了fedora本地存在的所有圖像:

$ docker images fedora

REPOSITORY   TAG         IMAGE ID        CREATED      SIZE
fedora       rawhide     ad57ef8d78d7    5 days ago   359.3 MB
fedora       20          105182bb5e8b    5 days ago   372.7 MB
fedora       heisenbug   105182bb5e8b    5 days ago   372.7 MB
fedora       latest      105182bb5e8b    5 days ago   372.7 MB

取消拉

docker pull例如通過CTRL-c在終端中運(yùn)行時(shí)按下該進(jìn)程來終止拉取操作。

$ docker pull fedora

Using default tag: latest
latest: Pulling from library/fedora
a3ed95caeb02: Pulling fs layer
236608c7b546: Pulling fs layer^C

注意:從技術(shù)上講,當(dāng)Docker引擎守護(hù)程序和啟動(dòng)引發(fā)的Docker引擎客戶端之間的連接丟失時(shí),引擎會(huì)終止一次pull操作。如果與引擎守護(hù)進(jìn)程的連接由于其他原因(而不是手動(dòng)交互)而丟失,則拉也會(huì)中止。

Previous article: Next article: