Generate Docker Run Command from Docker Container

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]

Related posts

Delete files FAST in Linux

Magento – Get the list of products which customer wanted to be notify when it is back in stock

Common Code Error When Upgrading to PHP 8.1