What run flags are included in my Docker Container

I started a docker container (using docker run). I can see it in my Kitematic app. When I start it from Kitematic, I’m sure it’s reusing my flags, like -P to expose ports.

How can I see what flags the container is using? For example, I forget what directory/volume I mounted to the container.

  • [pacemaker]Docker compose autostart
  • Connect to mongo docker with authentication from other docker (node)
  • Running Docker Commands with a bash script inside a container
  • Modifying and rebuilding a Docker image
  • Docker – fix service IP addresses [duplicate]
  • Kubernetes populate with base image
  • Linux+Docker - How to run host's apps from inside Docker container?
  • Monitoring changes at mounted a host directory from Docker container
  • How to map volume paths using Docker's --volumes-from?
  • How to change the version of Ruby in a Docker image (replace 2.2.0 with 2.0.0 )
  • Docker: Can different containers use different base Images?
  • Not able to Build any Dockerfile
  • One Solution collect form web for “What run flags are included in my Docker Container”

    Try first to look at the result of docker inspect:

    docker inspect yourContainerNameOrId
    

    docker inspect has an elaborate template-base format, explained in “Docker Inspect Template Magic”, written by Adrian Mouat.

    For instance, to get the port mapping of a container:

    docker inspect -f '{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' <containername>
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.