Dockerfile From Image (dfimage)を使うとDockerコンテナからDockerfileを復元することができます。dfimage自体がDockerコンテナとして提供されており、Dockerエンジンがあれば利用可能です。ただ、毎回Dockerコンテナを実行するのは大変なので、ショートカットするには「エイリアスを設定する」「Pythonスクリプト経由で利用する」といった方法があるようです。今回は後者の「Pythonスクリプト経由で利用する」方法をメモします。
peco (pronounced peh-koh) is based on a python tool, percol. percol was darn useful, but I wanted a tool that was a single binary, and forget about python. peco is written in Go, and therefore you can just grab the binary releases and drop it in your $PATH.
peco can be a great tool to filter stuff like logs, process stats, find files, because unlike grep, you can type as you think and look through the current results.
For basic usage, continue down below. For more cool elaborate usage samples, please see the wiki, and if you have any other tricks you want to share, please add to it!