주 메뉴 열기

wwiki β

바뀜

Docker cli

1,497 바이트 추가됨, 2023년 1월 22일 (일) 00:34
Options
--volumes-from list Mount volumes from the specified container(s)
 
==== Network Settings ====
<syntaxhighlight>
--dns=[] : Set custom dns servers for the container
--network="bridge" : Connect a container to a network
'bridge': create a network stack on the default Docker bridge
'none': no networking
'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network
--network-alias=[] : Add network-scoped alias for the container
--add-host="" : Add a line to /etc/hosts (host:IP)
--mac-address="" : Sets the container's Ethernet device's MAC address
--ip="" : Sets the container's Ethernet device's IPv4 address
--ip6="" : Sets the container's Ethernet device's IPv6 address
--link-local-ip=[] : Sets one or more container's Ethernet device's link local IPv4/IPv6 addresses
</syntaxhighlight>Supported networks :
{| class="wikitable"
!Network
!Description
|-
|'''none'''
|No networking in the container.
|-
|'''bridge''' (default)
|Connect the container to the bridge via veth interfaces.
|-
|'''host'''
|Use the host's network stack inside the container.
|-
|'''container'''<nowiki>:<name|id></nowiki>
|Use the network stack of another container, specified via its ''name'' or ''id''.
|-
|'''NETWORK'''
|Connects the container to a user created network (using <code>docker network create</code> command)
|}
=== 예시 ===
편집
2,431