1
0

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 1 year has passed since last update.

よく使うDocker コマンド覚書

Last updated at Posted at 2020-04-06

Dockerコマンド覚書

コンテナ操作に不慣れな私の備忘録

実行中のコンテナをリスト

$ docker ps -a
CONTAINER ID        IMAGE                                                         COMMAND                  CREATED             STATUS              PORTS               NAMES
dffbdaebcd67        ibm-workload-automation-agent-dynamic:9.5.0.00.201903080412   "/opt/wautils/wa_s..."   12 days ago         Up 12 days                              modest_swartz
5be02e1472cc        ibm-workload-automation-server:9.5.0.00.201903080358          "/opt/wautils/wa_s..."   2 weeks ago         Up 2 weeks                              xenodochial_sinoussi
53e263c5aec7        ibm-workload-automation-console:9.5.0.00.201903080738         "/opt/wautils/wa_s..."   2 weeks ago         Up 2 weeks                              hardcore_haibt
7f55c57b70a0        7afd43c3fd50                                                  "/opt/wautils/wa_s..."   3 weeks ago         Up 3 weeks                              distracted_jones

コンテナ内でコマンド実行(/bin/bash)

$ docker exec -it container_id /bin/bash
Setting CLI environment variables....
IBM Workload Scheduler Environment Successfully Set !!!
IBM Workload Automation Environment Successfully Set !!!
wauser@5be02e1472cc:/$ 

コンテナのログを見る

$ docker logs container_id

コンテナのログを見る(tail)

$ docker logs -f container_id

exitしてしまったコンテナ内のファイルなどを確認する

$ docker run --rm -it container_id sh
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?