Home Coding Generate Docker Run Command from Docker Container

Generate Docker Run Command from Docker Container

by Ben

Found a way to reverse engineer Docker Container to generate a Docker Run command so that I can safely remove the container and re-run it with some settings.

  1. Get the container id with “docker ps” command
  2. Then use this command to generate the docker run
docker inspect --format "$(curl -s https://gist.githubusercontent.com/efrecon/8ce9c75d518b6eb863f667442d7bc679/raw/run.tpl)" [container-id]

You may also like

Leave a Comment