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.

  • Docker daemon fails to restart gracefully
  • Using custom shell script as docker entrypoint
  • difference between checkpoint and docker export
  • managing a hierarchy of docker images
  • What is the replacement for `--net=container` in new docker networking?
  • Docker on Ubuntu 16.04 LTS
  • How to find what ports are exposed from docker image?
  • Connect to Tornado app in Docker
  • Playframework: activator dist taking too long from within docker container
  • Same docker image works on one machine and fails on the other
  • Limit elasticsearch indexes in size and rollover when the limit is reached
  • Cannot run nodejs app and mongo within a docker container
  • 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.