0
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 2022-11-23

実行環境

sw_vers:
ProductName: macOS
ProductVersion: 13.0.1
BuildVersion: 22A400

docker --version:
Docker version 20.10.21, build baeda1f

# dockerをインストールする
brew install --cask docker

# imageを探す
docker search centos

# プールする
docker pull centos

# imageを確認する
docker image ls

# imageから起動する(imageID)
# control + P + Q で containerから退出
docker run -it e6a0117ec169 bash

# 全ての container を確認
docker container ls -a

# container を停止する(containerID)
docker stop 61b3063ed1c7

# 既存 container を再開する(containerID)
docker start 61b3063ed1c7

# container の中に入る(containerID)
docker exec -it 61b3063ed1c7 bash 

# container 削除する(containerID)
docker container rm 61b3063ed1c7

# image 削除する(imageID)
docker image rm e6a0117ec169 

参考記事

0
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
0
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?