How to retrieve arguments given to docker run

Let’s say I did not use docker-compose and I used docker run directly.

There is a container that I have started a while ago and now I forgot what arguments I used when invoking docker run.

How do I get back the full docker run args (ex: docker run -d --name logstashtttt -v /var/log:/var-log:ro -v $HOME/repos/intelebase:/bbotmaster:ro -v /tmp:/hosttmp:ro -v /src/hg:/src-hg:ro -v /tank/vm_vbox/elasticsearch-data:/var/lib/logstash/data -p 9200:9200 -p 9300:9300 -e “some_env_var=value” myregistry.com:5000/logstash:1.4.1-post.tttt.03)

If you run docker inspect <containerid|containername>, you can see all the information related to that container. You can’t directly dump the arguments, but you can piece it back together with the information there-- volumes, exposed and published ports, image name, environment variables, etc.

Cheers!