LoginSignup
64
43

More than 5 years have passed since last update.

Dockerコンテナ一覧を表示し、任意のコンテナを起動する

Last updated at Posted at 2018-10-09

コンテナリストを表示する

コマンド

$ docker ps -a
  • -aオプションで停止しているコンテナも取得できる

結果

CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                    PORTS                               NAMES
e80a2e378dd0        redis                      "docker-entrypoint.s…"   4 days ago          Exited (255) 2 days ago   0.0.0.0:6379->6379/tcp              redis
c25d0803c172        handson/tutorial2:latest   "python index.py"        12 days ago         Exited (255) 2 days ago   0.0.0.0:8080->8080/tcp              tutorial2_application_1

コンテナを起動する

$ docker start <CONTAINER ID> 
64
43
0

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
64
43