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 2023-06-18

概要

dockerの基礎的なコマンドをまとめます

コマンド

・コンテナの作成

docker run -it コンテナ名  /bin/bash

・コンテナの起動

docker start コンテナ名

・コンテナに入る

docker exec -it コンテナ名 /bin/bash

・接続状態から抜ける

exit

・Rootユーザー以外でコンテナに入る

docker exec -it --user=ユーザ名 コンテナ名 /bin/bash

・特権モードでコンテナを作成

docker run -it --privileged コンテナ名 os名 /sbin/init

・パッケージのインストール

yum install パッケージ名

・使用しているosの確認

cat /etc/*-release
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?