1
4

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.

【Docker】Docker基本コマンド集

Posted at

ディレクトリ移動

対象のディレクトリに移動する。

# 公式:
$ cd /対象ディレクトリ
# 例:
$ cd /Users/名前/Develop/laravel-sns/laradock

コンテナ起動

コンテナを指定して起動する。

# 公式:
$ docker-compose up -d コンテナ名
# 例:
$ docker-compose up -d workspace php-fpm nginx postgres

コンテナ起動停止

コンテナの起動を停止する。

$ docker-compose stop

コンテナ一覧表示

コンテナ一覧を表示する。

# 起動しているコンテナ一覧表示
$ docker ps
# 全てのコンテナ一覧表示
$ docker ps -a

ログ確認

コンテナを指定してログを確認する。

# 公式:
$ docker logs コンテナID
# 例:
$ docker logs 4ad7c576bd1c

コンテナ削除

コンテナを指定して削除する。

# 公式:
$ docker rm コンテナID
# 例:
$ docker rm 4ad7c576bd1c
# 強制削除:
$ docker rm -f 4ad7c576bd1c
1
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?