https://github.com/lavie/runlike
查看docker container的启动命令
--add-host list Add a custom host-to-IP mapping(host:ip)--cap-add list Add Linux capabilities--cap-drop list Drop Linux capabilities(0-3, 0,1)-d, --detach Run container in background andprint container ID--device list Add a host device to the container--dns list Set custom DNS servers-e, --env list Set environment variables--expose list Expose a port or a range of ports-h, --hostname string Container host name--mac-address string Container MAC address (e.g.,92:d0:c6:0a:29:33)-l, --label list Set meta data on a container--log-driver string Logging driver for the container--log-opt list Log driver options--link list Add link to another container--name string Assign a name to the container--network string Connect a container to a network(default "default")--privileged Give extended privileges to thiscontainer-p, --publish list Publish a container's port(s) tothe host--restart string Restart policy to apply when acontainer exits (default "no")-t, --tty Allocate a pseudo-TTY-u, --user string Username or UID (format:<name|uid>[:<group|gid>])-v, --volume list Bind mount a volume--volumes-from list Mount volumes from the specifiedcontainer(s)-w, --workdir string Working directory inside the container
$ runlike -p redisdocker run \--name=redis \-e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \-e "REDIS_VERSION=2.8.9" \-e "REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-2.8.9.tar.gz" \-e "REDIS_DOWNLOAD_SHA1=003ccdc175816e0a751919cf508f1318e54aac1e" \-p 0.0.0.0:6379:6379/tcp \--detach=true \myrepo/redis:7860c450dbee9878d5215595b390b9be8fa94c89 \redis-server --slaveof 172.31.17.84 6379
