<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<style>
*{
margin: 0;
padding: 0;
}
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
</style>
<div style="font-family:"微软雅黑"; line-height:1.6;"><style>
*{
margin: 0;
padding: 0;
}
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
</style>
<div>
<div>
<div style="font-family: 微软雅黑; line-height: 1.6;"><span><br>
</span></div>
<div style="font-family: 微软雅黑; line-height: 1.6;"><span><br>
</span></div>
<div style="font-family: 微软雅黑; line-height: 1.6;"><span>I want to create a container </span><span style="line-height: 22.4px;">use Zun, like the docker command </span></div>
<div style="font-family: 微软雅黑; line-height: 1.6;"><span><br>
</span></div>
<div><strong style="font-family: 微软雅黑; line-height: 1.6;"><code>docker run -p ip:hostPort:containerPort </code></strong><font face="monospace"><b>OPTIONS</b></font></div>
<div><font face="monospace"><b><br>
</b></font></div>
<div>so i can access the container_port via hostip:hostport ,but i can't <span style="line-height: 1.6;">find some similar commands in Zun Command Line</span></div>
<div><span style="line-height: 1.6;"><br>
</span></div>
<div>
<div>usage: zun run [-n <name>] [--cpu <cpu>] [-m <memory>] [-e <KEY=VALUE>]</div>
<div> [--workdir <workdir>] [--auto-remove] [--label <KEY=VALUE>]</div>
<div> [--image-pull-policy <policy>] [--restart <restart>] [-i]</div>
<div> [--image-driver <image_driver>]</div>
<div> [--security-group <security-group>] [--hint <key=value>]</div>
<div> [--net <auto, network=network, port=port-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr>]</div>
<div> [--mount <mount>] [--runtime <runtime>] [--hostname <hostname>]</div>
<div> <image> ...</div>
<div><br>
</div>
<div>Run a command in a new container.</div>
<div><br>
</div>
<div>Positional arguments:</div>
<div> <image> name or ID of the image</div>
<div> <command> Send command to the container</div>
<div><br>
</div>
<div>Optional arguments:</div>
<div> -n <name>, --name <name></div>
<div> name of the container</div>
<div> --cpu <cpu> The number of virtual cpus.</div>
<div> -m <memory>, --memory <memory></div>
<div> The container memory size in MiB</div>
<div> -e <KEY=VALUE>, --environment <KEY=VALUE></div>
<div> The environment variables</div>
<div> --workdir <workdir> The working directory for commands to run in</div>
<div> --auto-remove Automatically remove the container when it exits</div>
<div> --label <KEY=VALUE> Adds a map of labels to a container. May be used</div>
<div> multiple times.</div>
<div> --image-pull-policy <policy></div>
<div> The policy which determines if the image should be</div>
<div> pulled prior to starting the container. It can have</div>
<div> following values: "ifnotpresent": only pull the image</div>
<div> if it does not already exist on the node. "always":</div>
<div> Always pull the image from repository."never": never</div>
<div> pull the image</div>
<div> --restart <restart> Restart policy to apply when a container exits(no, on-</div>
<div> failure[:max-retry], always, unless-stopped)</div>
<div> -i, --interactive Keep STDIN open even if not attached, allocate a</div>
<div> pseudo-TTY</div>
<div> --image-driver <image_driver></div>
<div> The image driver to use to pull container image. It</div>
<div> can have following values: "docker": pull the image</div>
<div> from Docker Hub. "glance": pull the image from Glance.</div>
<div> --security-group <security-group></div>
<div> The name of security group for the container. May be</div>
<div> used multiple times.</div>
<div> --hint <key=value> The key-value pair(s) for scheduler to select host.</div>
<div> The format of this parameter is</div>
<div> "key=value[,key=value]". May be used multiple times.</div>
<div> --net <auto, network=network, port=port-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr></div>
<div> Create network enpoints for the container. auto: do</div>
<div> not specify the network, zun will automatically create</div>
<div> one. network: attach container to the specified</div>
<div> neutron networks. port: attach container to the</div>
<div> neutron port with this UUID. v4-fixed-ip: IPv4 fixed</div>
<div> address for container. v6-fixed-ip: IPv6 fixed address</div>
<div> for container.</div>
<div> --mount <mount> A dictionary to configure volumes mounted inside the</div>
<div> container.</div>
<div> --runtime <runtime> The runtime to use for this container. It can have</div>
<div> value "runc" or any other custom runtime.</div>
<div> --hostname <hostname></div>
<div> Container hostname</div>
<div style="line-height: 1.6;"><br>
</div>
</div>
<div><span style="line-height: 1.6;"><br>
</span></div>
<div><span style="line-height: 1.6;"><br>
</span></div>
<div><font face="monospace"><b><br>
</b></font></div>
<div><br>
</div>
<div id="ntes-pcmail-signature" style="font-family: 微软雅黑; line-height: 1.6;"><style type="text/css">
a#ntes-pcmail-signature-default:hover {
text-decoration: underline;
color: #199cff;
cursor: pointer;
}
a#ntes-pcmail-signature-default:active {
text-decoration: underline;
color: #246fce;
cursor: pointer;
}
</style></div>
</div>
<!--😀--></div>
<!--😀--></div>
</body>
</html>