亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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

描述

創(chuàng)建一個新容器

使用

docker create [OPTIONS] IMAGE [COMMAND] [ARG...]

備選方案

名字,簡寫

默認(rèn)

描述

--add-host


添加自定義的主機(jī)到IP映射(主機(jī):IP)

--attach, -a


附加到STDIN,STDOUT或STDERR

--blkio-weight

0

阻止IO(相對權(quán)重),介于10和1000之間,或0禁用(默認(rèn)值為0)

--blkio-weight-device


塊IO重量(相對設(shè)備重量)

--cap-add


添加Linux功能

--cap-drop


刪除Linux功能

--cgroup-parent


容器的可選父cgroup

--cidfile


將容器ID寫入文件

--cpu-count

0

CPU數(shù)量(僅限Windows)

--cpu-percent

0

CPU百分比(僅限Windows)

--cpu-period

0

限制CPU CFS(完全公平調(diào)度程序)期間

--cpu-quota

0

限制CPU CFS(完全公平調(diào)度程序)配額

--cpu-rt-period

0

限制CPU實(shí)時(shí)周期(以微秒為單位)

--cpu-rt-runtime

0

以微秒為單位限制CPU實(shí)時(shí)運(yùn)行時(shí)間

--cpu-shares,-c

0

CPU份額(相對重量)

--cpus


CPU數(shù)量

--cpuset-cpus


允許執(zhí)行的CPU(0-3,0,1)

--cpuset-MEMS


允許執(zhí)行的MEM(0-3,0,1)

--device


將主機(jī)設(shè)備添加到容器

--device-cgroup-rule


將規(guī)則添加到cgroup允許的設(shè)備列表

--device-read-bps


限制設(shè)備的讀取速率(每秒字節(jié)數(shù))

--device-read-iops


限制設(shè)備的讀取速率(每秒IO)

--device-write-bps


限制寫入速率(每秒字節(jié)數(shù))到設(shè)備

--device-write-iops


限制寫入速率(每秒IO)到設(shè)備

--disable-content-trust

真正

跳過圖像驗(yàn)證

--dns


設(shè)置自定義DNS服務(wù)器

--dns-OPT


設(shè)置DNS選項(xiàng)

--dns-option


設(shè)置DNS選項(xiàng)

--dns-search


設(shè)置自定義DNS搜索域

--entrypoint


覆蓋圖像的默認(rèn)入口點(diǎn)

--env,-e


設(shè)置環(huán)境變量

--env-file


讀入環(huán)境變量文件

--expose


公開一個端口或一系列端口

--group-add


添加其他群組加入

--health-cmd


運(yùn)行以檢查運(yùn)行狀況的命令

--health-interval

0

運(yùn)行檢查之間的時(shí)間(ms | s | m | h)(默認(rèn)為0)

--health-retries

0

需要報(bào)告不健康的連續(xù)失敗

--health-start-period

0

啟動健康重試倒數(shù)前,容器初始化的開始時(shí)間段(ms | s | m | h)(默認(rèn)為0)

--health-timeout

0

允許一次檢查運(yùn)行的最長時(shí)間(ms | s | m | h)(默認(rèn)值為0)

--help

打印用法

--hostname,-h


容器主機(jī)名稱

--init

在容器中運(yùn)行一個轉(zhuǎn)發(fā)信號并收集進(jìn)程的init

--interactive, -i

即使沒有連接,也要保持STDIN打開

--io-MaxBandwidth

0

系統(tǒng)驅(qū)動器的最大IO帶寬限制(僅限Windows)

--io-maxiops

0

系統(tǒng)驅(qū)動器的最大IOps限制(僅限Windows)

--ip


IPv4地址(例如172.30.100.104)

--ip6


IPv6地址(例如,2001:db8 :: 33)

--ipc


IPC命名空間使用

--isolation


容器隔離技術(shù)

--kernel-memory

0

內(nèi)核內(nèi)存限制

--label, -l


在容器上設(shè)置元數(shù)據(jù)

--label-file


閱讀標(biāo)簽的行分隔文件

--link


將鏈接添加到其他容器

--link-local-ip


Container IPv4 / IPv6鏈路本地地址

--log-driver


記錄容器的驅(qū)動程序

--log-OPT


日志驅(qū)動選項(xiàng)

--mac-address


容器MAC地址(例如,92:d0:c6:0a:29:33)

--memory, -m

0

內(nèi)存限制

--memory-reservation

0

內(nèi)存軟限制

--memory-swap

0

交換限制等于內(nèi)存加交換:'-1'以啟用無限交換

--memory-swappiness

-1

調(diào)整容器內(nèi)存swappiness(0到100)

--mount


將文件系統(tǒng)掛載附加到容器

--name


為容器分配一個名稱

--net

默認(rèn)

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

--net-alias


為容器添加網(wǎng)絡(luò)范圍的別名

--network

默認(rèn)

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

--network-alias


為容器添加網(wǎng)絡(luò)范圍的別名

--no-healthcheck

禁用任何容器指定的HEALTHCHECK

--oom-kill-disable

禁用OOM殺手

--oom-score-adj

0

調(diào)整主機(jī)的OOM首選項(xiàng)(從-1000到1000)

--pid


要使用的PID名稱空間

--pids-limit

0

調(diào)整容器匹配限制(無限制地設(shè)置-1)

--privileged

給這個容器賦予擴(kuò)展權(quán)限

--publish,-p


將容器的端口發(fā)布到主機(jī)

--publish-all,-P

將所有暴露的端口發(fā)布到隨機(jī)端口

--read-only

將容器的根文件系統(tǒng)掛載為只讀

--restart

沒有

重新啟動策略以在容器退出時(shí)應(yīng)用

--rm

當(dāng)容器退出時(shí)自動移除容器

--runtime


運(yùn)行時(shí)用于此容器

--security-opt


安全選項(xiàng)

--shm-size

0

/ dev / shm的大小

--stop-signal

SIGTERM

停止容器的信號

--stop-timeout

0

超時(shí)(以秒為單位)停止容器

--storage-opt


容器的存儲驅(qū)動程序選項(xiàng)

--sysctl

地圖[]

Sysctl選項(xiàng)

--tmpfs


掛載一個tmpfs目錄

--tty, -t

分配一個偽TTY

--ulimit


Ulimit選項(xiàng)

--user,-u


用戶名或UID(格式:<名稱| uid>:<組| gid>)

--userns


要使用的用戶名稱空間

--uts


UTS命名空間使用

--volume, -v


綁定安裝一個卷

--volume-driver


容器的可選卷驅(qū)動程序

--volumes-from


從指定容器裝載卷

--workdir,-w


容器內(nèi)的工作目錄

父命令

命令

描述

docker

Docker CLI的基本命令。

擴(kuò)展描述

docker create命令在指定的映像上創(chuàng)建一個可寫容器層,并為運(yùn)行指定的命令做好準(zhǔn)備。然后將容器ID打印到STDOUT。這與docker run -d容器永遠(yuǎn)不會啟動的情況類似。然后您可以使用該docker start <container_id>命令隨時(shí)啟動容器。

當(dāng)您希望提前設(shè)置容器配置以便在需要時(shí)啟動它時(shí),這非常有用。新容器的初始狀態(tài)是created。

請看運(yùn)行命令部分和碼頭運(yùn)行參考更多細(xì)節(jié)。

實(shí)例

創(chuàng)建并啟動容器

$ docker create -t -i fedora bash

6d8af538ec541dd581ebc2a24153a28329acb5268abe5ef868c1f1a261221752

$ docker start -a -i 6d8af538ec5

bash-4.2#

初始化volume

從v1.4.0開始,容器卷在該docker create階段被初始化(即,docker run也是)。例如,這可以讓你createdata體積的容器中,然后用它從另一個容器:

$ docker create -v /data --name data ubuntu

240633dfbb98128fa77473d3d9018f6123b99c454b3251427ae190a7d951ad57

$ docker run --rm --volumes-from data ubuntu ls -la /data

total 8drwxr-xr-x  2 root root 4096 Dec  5 04:10 .drwxr-xr-x 48 root root 4096 Dec  5 04:11 ..

同樣,create主機(jī)目錄綁定安裝的卷容器,然后可以從后續(xù)容器中使用該容器:

$ docker create -v /home/docker:/docker --name docker ubuntu

9aa88c08f319cd1e4515c3c46b0de7cc9aa75e878357b1e96f91e2c773029f03

$ docker run --rm --volumes-from docker ubuntu ls -la /docker

total 20drwxr-sr-x  5 1000 staff  180 Dec  5 04:00 .drwxr-xr-x 48 root root  4096 Dec  5 04:13 ..-rw-rw-r--  1 1000 staff 3833 Dec  5 04:01 .ash_history-rw-r--r--  1 1000 staff  446 Nov 28 11:51 .ashrc-rw-r--r--  1 1000 staff   25 Dec  5 04:00 .gitconfig
drwxr-sr-x  3 1000 staff   60 Dec  1 03:28 .local-rw-r--r--  1 1000 staff  920 Nov 28 11:51 .profile
drwx--S---  2 1000 staff  460 Dec  5 00:51 .ssh
drwxr-xr-x 32 1000 staff 1140 Dec  5 04:01 docker

設(shè)置每個容器的存儲驅(qū)動程序選項(xiàng)。

$ docker create -it --storage-opt size=120G fedora /bin/bash

這個(大?。⒃试S在創(chuàng)建時(shí)將容器rootfs大小設(shè)置為120G。此選項(xiàng)僅適用于devicemapper,btrfs,overlay2,windowsfilterzfs圖形驅(qū)動程序。對于devicemapper,btrfs,windowsfilterzfs圖形驅(qū)動程序,用戶無法通過的尺寸小于默認(rèn)尺寸BaseFS。對于overlay2存儲驅(qū)動程序,大小選項(xiàng)僅在支持fs為xfs并使用pquota安裝選項(xiàng)安裝時(shí)可用。在這些條件下,用戶可以通過任何小于支持fs大小的大小。

指定容器的隔離技術(shù)(隔離)

在Windows上運(yùn)行Docker容器的情況下,此選項(xiàng)很有用。該--isolation=<value>選項(xiàng)設(shè)置容器的隔離技術(shù)。在Linux上,唯一支持的是default使用Linux命名空間的選項(xiàng)。在Microsoft Windows上,您可以指定這些值:

描述

默認(rèn)

使用Docker守護(hù)進(jìn)程的--exec-opt指定的值。如果守護(hù)進(jìn)程未指定隔離技術(shù),則Microsoft將使用進(jìn)程作為其默認(rèn)值

守護(hù)進(jìn)程在Windows服務(wù)器上運(yùn)行,如果在Windows客戶端上運(yùn)行,則守護(hù)進(jìn)程運(yùn)行在hyperv上。


process

僅命名空間隔離。

Hyper-V

基于Hyper-V管理程序分區(qū)的隔離。

指定--isolation沒有值的標(biāo)志與設(shè)置--isolation="default"相同。

處理動態(tài)創(chuàng)建的設(shè)備(-device-cgroup-rule)

在創(chuàng)建時(shí)分配可用于容器的設(shè)備。分配的設(shè)備都將被添加到cgroup.allow文件,并在運(yùn)行后創(chuàng)建到容器中。當(dāng)需要將新設(shè)備添加到正在運(yùn)行的容器時(shí),這會造成問題。

解決方案之一是向容器添加更寬松的規(guī)則,以允許訪問更廣泛的設(shè)備。例如,假設(shè)我們的容器需要訪問具有主要42和任意次數(shù)的字符設(shè)備(添加為新設(shè)備出現(xiàn)),則會添加以下規(guī)則:

docker create --device-cgroup-rule='c 42:* rmw' -name my-container my-image

然后,用戶可能會要求udev執(zhí)行腳本,docker exec my-container mknod newDevX c 42 <minor>以便在添加所需設(shè)備時(shí)使用該腳本。

注意:最初存在的設(shè)備仍然需要明確地添加到 create / run 命令中

Previous article: Next article: