Docker安装和基础用法 Docker入门教程第二篇

2020-06-17 06:49:20易采站长站整理

--ipc string IPC namespace to use
-m, --memory string Memory limit
--memory-reservation string Memory soft limit
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
--kernel-memory string Kernel memory limit
-u, --user string Username or UID (format: <name|uid>[:<group|gid>])
--userns string User namespace to use
--uts string UTS namespace to use
-h, --hostname string Container host name
--pid string PID namespace to use
--pids-limit int Tune container pids limit (set -1 for unlimited)
--isolation string Container isolation technology
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
--io-maxiops uint Maximum IOps limit for the system drive (Windows only)

linux process capabilities 相关参数:


--cap-add value Add Linux capabilities (default [])
--cap-drop value Drop Linux capabilities (default [])

容器运行模式和环境相关:


-d, --detach Run container in background and print container ID
-e, --env value Set environment variables (default [])
--env-file value Read in a file of environment variables (default [])

DNS 相关:


--dns value Set custom DNS servers (default [])
--dns-opt value Set DNS options (default [])
--dns-search value Set custom DNS search domains (default [])

健康检查相关:


--health-cmd string Command to run to check health
--health-interval duration Time between running the check
--health-retries int Consecutive failures needed to report unhealthy
--health-timeout duration Maximum time to allow one check to run
--no-healthcheck Disable any container-specified HEALTHCHECK

IP 和端口:


--ip string Container IPv4 address (e.g. 172.30.100.104)
--ip6 string Container IPv6 address (e.g. 2001:db8::33)
-p, --publish value Publish a container's port(s) to the host (default [])
-P, --publish-all Publish all exposed ports to random ports
--expose value Expose a port or a range of ports (default [])
--mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33)
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])

Volume 相关:


-v, --volume value Bind mount a volume (default [])