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

ディレクトリ 検索
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構建) 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
テキスト

描述

創(chuàng)建網(wǎng)絡

用法

docker network create [OPTIONS] NETWORK

選項

名稱,簡寫

默認

描述

--attachable

false

啟用手動容器附件

--aux地址

map[]

網(wǎng)絡驅動程序使用的輔助IPv4或IPv6地址

--config-from


從中復制配置的網(wǎng)絡

--config-only

false

創(chuàng)建一個僅配置網(wǎng)絡

--driver,-d

bridge

驅動程序來管理網(wǎng)絡

--gateway


主子網(wǎng)的IPv4或IPv6網(wǎng)關

--ingress

false

創(chuàng)建群體路由網(wǎng)狀網(wǎng)絡

--internal

false

限制對網(wǎng)絡的外部訪問

--ip-range


從子范圍分配容器IP

--ipam-driver

default

IP地址管理驅動程序

--ipam-opt

map[]

設置IPAM驅動程序特定選項

--ipv6

false

啟用IPv6網(wǎng)絡

--label


在網(wǎng)絡上設置元數(shù)據(jù)

--opt, -o

map[]

設置驅動程序特定選項

--scope


控制網(wǎng)絡的范圍

--subnet


表示網(wǎng)段的CIDR格式的子網(wǎng)

父命令

命令

描述

docker網(wǎng)絡

管理網(wǎng)絡

相關命令

命令

描述

docker network connect

將容器連接到網(wǎng)絡

docker network create

創(chuàng)建一個網(wǎng)絡

docker network disconnect

從網(wǎng)絡斷開容器

docker network inspect

顯示一個或多個網(wǎng)絡的詳細信息

docker network ls

列出網(wǎng)絡

docker network prune

刪除所有未使用的網(wǎng)絡

docker network rm

刪除一個或多個網(wǎng)絡

擴展描述

創(chuàng)建一個新的網(wǎng)絡。在DRIVER接受bridge或者overlay它們是內(nèi)置的網(wǎng)絡驅動程序。如果您已經(jīng)安裝了第三方或您自己的自定義網(wǎng)絡驅動程序,您也可以DRIVER在此處指定。如果您不指定該--driver選項,該命令將自動bridge為您創(chuàng)建一個網(wǎng)絡。當您安裝Docker Engine時,它會bridge自動創(chuàng)建一個網(wǎng)絡。該網(wǎng)絡對應于docker0引擎?zhèn)鹘y(tǒng)依賴的橋梁。當你啟動一個新的容器時,docker run它會自動連接到這個網(wǎng)橋。您無法刪除此默認橋接網(wǎng)絡,但可以使用該network create命令創(chuàng)建新橋接網(wǎng)絡。

$ docker network create -d bridge my-bridge-network

橋接網(wǎng)絡是單個引擎安裝中的隔離網(wǎng)絡。如果您想創(chuàng)建一個跨多個運行引擎的多個Docker主機的overlay網(wǎng)絡,則必須創(chuàng)建一個網(wǎng)絡。與bridge網(wǎng)絡不同,覆蓋網(wǎng)絡在創(chuàng)建之前需要一些預先存在的條件。這些條件是:

  • 訪問鍵值存儲。引擎支持Consul,Etcd和ZooKeeper(分布式存儲)鍵值存儲。

  • 連接到鍵值存儲的主機集群。

  • daemon集群中每臺主機上配置正確的引擎。

dockerd支持overlay網(wǎng)絡的選項有:

  • --cluster-store

  • --cluster-store-opt

  • --cluster-advertise

要詳細了解這些選項以及如何配置它們,請參閱“ 多主機網(wǎng)絡入門 ”。

雖然不是必需的,但安裝Docker Swarm來管理組成網(wǎng)絡的集群是一個不錯的主意。Swarm提供了復雜的發(fā)現(xiàn)和服務器管理工具,可以幫助您實施。

準備好overlay網(wǎng)絡先決條件后,只需在集群中選擇Docker主機并發(fā)出以下命令即可創(chuàng)建網(wǎng)絡:

$ docker network create -d overlay my-multihost-network

網(wǎng)絡名稱必須是唯一的。Docker守護進程嘗試識別命名沖突,但不能保證。避免名稱沖突是用戶的責任。

實例

連接容器

當您啟動容器時,請使用--network標志將其連接到網(wǎng)絡。本例將busybox容器添加到mynet網(wǎng)絡中:

$ docker run -itd --network=mynet busybox

如果要在容器已經(jīng)運行后將容器添加到網(wǎng)絡,請使用docker network connect子命令。

您可以將多個容器連接到同一個網(wǎng)絡。連接后,容器只能使用另一個容器的IP地址或名稱進行通信。對于overlay支持多主機連接的網(wǎng)絡或自定義插件,連接到相同多主機網(wǎng)絡但從不同引擎啟動的容器也可以通過這種方式進行通信。

您可以使用該docker network disconnect命令從網(wǎng)絡斷開容器。

指定高級選項

在創(chuàng)建網(wǎng)絡時,Engine默認會為網(wǎng)絡創(chuàng)建一個不重疊的子網(wǎng)。這個子網(wǎng)不是現(xiàn)有網(wǎng)絡的細分。這純粹是為了ip地址的目的。您可以覆蓋此默認值并直接使用--subnet選項指定子網(wǎng)值。在bridge網(wǎng)絡上,您只能創(chuàng)建一個子網(wǎng):

$ docker network create --driver=bridge --subnet=192.168.0.0/16 br0

另外,您還可以指定--gateway --ip-range--aux-address選項。

$ docker network create \  --driver=bridge \  --subnet=172.28.0.0/16 \  --ip-range=172.28.5.0/24 \  --gateway=172.28.5.254 \
  br0

如果您省略--gateway標志,引擎會從首選池中為您選擇一個。對于overlay網(wǎng)絡和支持它的網(wǎng)絡驅動程序插件,您可以創(chuàng)建多個子網(wǎng)。

$ docker network create -d overlay \  --subnet=192.168.0.0/16 \  --subnet=192.170.0.0/16 \  --gateway=192.168.0.100 \  --gateway=192.170.0.100 \  --ip-range=192.168.1.0/24 \  --aux-address="my-router=192.168.1.5" --aux-address="my-switch=192.168.1.6" \  --aux-address="my-printer=192.170.1.5" --aux-address="my-nas=192.170.1.6" \
  my-multihost-network

確保你的子網(wǎng)不重疊。如果他們這樣做,網(wǎng)絡創(chuàng)建失敗,引擎返回錯誤。

橋接司機選項

在創(chuàng)建自定義網(wǎng)絡時,默認網(wǎng)絡驅動程序(即bridge)具有可以傳遞的其他選項。以下是用于docker0橋的那些選項和等效的docker守護進程標志:

選項

當量

描述

com.docker.network.bridge.name

-

在創(chuàng)建Linux橋時要使用的橋名稱

com.docker.network.bridge.enable_ip_masquerade

--ip-masq

啟用IP偽裝

com.docker.network.bridge.enable_icc

--icc

啟用或禁用集裝箱間連接

com.docker.network.bridge.host_binding_ipv4

--ip

綁定容器端口時的默認IP

com.docker.network.driver.mtu

--mtu

設置容器網(wǎng)絡MTU

以下參數(shù)可以傳遞給docker network create任何網(wǎng)絡驅動程序,同樣也可以傳遞給它們的近似等價物docker daemon。

論據(jù)

當量

描述

--gateway

-

主子網(wǎng)的IPv4或IPv6網(wǎng)關

--ip范圍

--fixed,CIDR

從一個范圍分配IP

- 內(nèi)部

-

限制對網(wǎng)絡的外部訪問

--ipv6

--ipv6

啟用IPv6網(wǎng)絡

--subnet

--bip

網(wǎng)絡子網(wǎng)

例如,讓我們使用-o--opt在發(fā)布端口時指定IP地址綁定的選項:

$ docker network create \    -o "com.docker.network.bridge.host_binding_ipv4"="172.19.0.1" \
    simple-network

網(wǎng)絡內(nèi)部模式

默認情況下,當您將容器連接到overlay網(wǎng)絡時,Docker也會將橋接網(wǎng)絡連接到它以提供外部連接。如果您想創(chuàng)建一個外部隔離的overlay網(wǎng)絡,您可以指定該--internal選項。

網(wǎng)絡入口模式

您可以創(chuàng)建將用于在群集中提供路由網(wǎng)格的網(wǎng)絡。您可以通過--ingress在創(chuàng)建網(wǎng)絡時指定。當時只能創(chuàng)建一個入口網(wǎng)絡。只有在沒有服務依賴它的情況下才能刪除網(wǎng)絡。除了--attachable選項之外,創(chuàng)建入口網(wǎng)絡時創(chuàng)建覆蓋網(wǎng)絡時可用的任何選項也可用。

$ docker network create -d overlay \  --subnet=10.11.0.0/16 \  --ingress \  --opt com.docker.network.mtu=9216 \  --opt encrypted=true \
  my-ingress-network
前の記事: 次の記事: