-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Desktop CLI Commands
foolmacky edited this page Nov 7, 2022
·
8 revisions
//imageのそのままの取得
docker pull centos:centos7
//imageの確認
docker images
//imageの起動(コンテナ名付き)
docker run -it -d --name centos7 centos:centos7
//docker desktopのUIからでも起動できるが、portのbind, networkの設定などの細かい設定はコマンドでしかできない
docker run -it -d --name centos7 -p IP:80:8080 centos:centos7
//ホスト側8080portとコンテナ80portが直結される
//containerにログイン
docker exec -it centos7 /bin/sh