https://github.com/lavie/runlike

    查看docker container的启动命令

    1. --add-host list Add a custom host-to-IP mapping
    2. (host:ip)
    3. --cap-add list Add Linux capabilities
    4. --cap-drop list Drop Linux capabilities
    5. (0-3, 0,1)
    6. -d, --detach Run container in background and
    7. print container ID
    8. --device list Add a host device to the container
    9. --dns list Set custom DNS servers
    10. -e, --env list Set environment variables
    11. --expose list Expose a port or a range of ports
    12. -h, --hostname string Container host name
    13. --mac-address string Container MAC address (e.g.,
    14. 92:d0:c6:0a:29:33)
    15. -l, --label list Set meta data on a container
    16. --log-driver string Logging driver for the container
    17. --log-opt list Log driver options
    18. --link list Add link to another container
    19. --name string Assign a name to the container
    20. --network string Connect a container to a network
    21. (default "default")
    22. --privileged Give extended privileges to this
    23. container
    24. -p, --publish list Publish a container's port(s) to
    25. the host
    26. --restart string Restart policy to apply when a
    27. container exits (default "no")
    28. -t, --tty Allocate a pseudo-TTY
    29. -u, --user string Username or UID (format:
    30. <name|uid>[:<group|gid>])
    31. -v, --volume list Bind mount a volume
    32. --volumes-from list Mount volumes from the specified
    33. container(s)
    34. -w, --workdir string Working directory inside the container
    1. $ runlike -p redis
    2. docker run \
    3. --name=redis \
    4. -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
    5. -e "REDIS_VERSION=2.8.9" \
    6. -e "REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-2.8.9.tar.gz" \
    7. -e "REDIS_DOWNLOAD_SHA1=003ccdc175816e0a751919cf508f1318e54aac1e" \
    8. -p 0.0.0.0:6379:6379/tcp \
    9. --detach=true \
    10. myrepo/redis:7860c450dbee9878d5215595b390b9be8fa94c89 \
    11. redis-server --slaveof 172.31.17.84 6379