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.

  • Bamboo: More than one agent per EC2 elastic instance?
  • Install + start ssh in dockerfile derived from official jenkins docker image
  • Jenkins ANT scripting: Save file with timestamp
  • how to get container name from inside? docker.io
  • Laradock: how to enable/install php7 ldap support extension?
  • Boot2Docker starting Ubuntu image
  • Run a command on a container from inside another one
  • How to setup Docker for a polyglot microservice-based application?
  • Kubectl: Kubernetes with minikube times out
  • Ambari 2.2 - exiting with non-zero status code on Ubuntu 14.04 Docker container
  • How to exclude some paths when mounting the volume?
  • Shutting down Docker containers via supervisor
  • 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.