20
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

peco-docker を作ってみました

Posted at

Pecrant にインスパイアされて、Docker でも peco を使いたいと思い、
peco-docker スクリプトを作ってみました。

YungSang/peco-docker

大別して、

  1. docker search <term> | peco を使った検索系
  2. docker images | peco を使ったイメージ操作系
  3. docker ps | peco を使ったコンテナ操作系
    があります。

インストールは、

  1. https://github.com/YungSang/peco-docker/releases/latest から peco-docker をダウンロードして、
  2. chmod +x peco-docker で実行可能にし、
  3. $PATH の通ったディレクトリに配置するだけ。
    もちろん、peco、docker は既にインストールされていることが前提です。

私は例によって今回も alias deco="peco-docker"deco として使ってますw

Usage: peco-docker <command> [OPTIONS]

command:
  search          Search Docker images in the Docker registry
  pull            Search Docker images and download the selected images

  images [-a]     List the selected images in your Docker host ($DOCKER_HOST)
  tag             Tag the FIRST selected image
  push            Push the selected images to the Docker registry
  save > <tar>    Export the FIRST selected image
  rmi [-f]        Remove the selected images
  inspecti [-f]   Show low-level information on the selected images
  history         Show the history of the selected images

  ps [-a]         List the selected containers in your Docker host ($DOCKER_HOST)
  attach          Attach to the FIRST selected running container
  commit [tag]    Create a new image from the FIRST selected running container
  diff            Inspect changes on the FIRST selected container's filesystem
  export > <tar>  Export the contents of the FIRST selected container's filesystem
  start           Start the selected stopped containers
  restart         Restart the selected running containers
  stop            Stop the selected running containers
  kill            Kill the selected running containers
  rm [-f]         Remove the selected containers
  inspect [-f]    Show low-level information on the selected containers
  top             Lookup the processes of the selected running containers
  logs            Fetch the logs of the FIRST selected container

  version         Show the version of peco-docker
  help            Show this message
20
17
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?