{"repo":"lavie/runlike","free":true,"listed":false,"github":"https://github.com/lavie/runlike","clone":"git clone https://github.com/lavie/runlike.git","description":"Given an existing docker container, prints the command line necessary to run a copy of it.","language":"Python","stars":2939,"topics":["docker","docker-container","python"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"\"See this docker container? I wish I could run another one just like it, but I'll be damned if I'm going to type all those command-line switches manually!\" This is what runlike does. You give it a docker container, it outputs the command line necessary to run another one just like it, along with all those pesky options (ports, links, volumes, ...). It's a real time saver for those that normally deploy their docker containers via some CM tool like Ansible/Chef and then find themselves needing to manually re-run some container. Usage runlike This prints out what you need to run to get a similar container. You can do $(runlike container-name) to simply execute its output in one step. -p breaks the command line down to nice, pretty lines. For example: $ runlike -p redis docker run \\ --name=redis \\ -e \"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\" \\ -e \"REDIS VERSION=2.8.9\" \\ -e \"REDIS DOWNLOAD URL=http://download.redis.io/releases/redis-2.8.9.tar.gz\" \\ -e \"REDIS DOWNLOAD SHA1=003ccdc175816e0a751919cf508f1318e54aac1e\" \\ -p 0.0.0.0:6379:6379/tcp \\ --detach=true \\ myrepo/redis:7860c450dbee9878d5215595b390b9be8fa94c89 \\ redis-server --slaveof 172.31.17.84 6379 Feeding it the output of docker inspect also works: --no-name will omit the container name from the output (to avoid collisions). Run without installing runlike is packaged as a Docker image: assaflavie/runlike. You can also run it with an alias by adding the following to your /.profile or /.bashrc : Now ru","default_branch":null,"files":null,"tree":[],"storefront":"/r/lavie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lavie/runlike/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}