75
77

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 3 years have passed since last update.

dockerで立ち上げたコンテナにログインする

Last updated at Posted at 2016-05-07
docker exec -it [コンテナ名] /bin/bash

これで、rootでログインできる。

root以外でログインしたい時は

docker exec -it [コンテナ名] --user [ユーザー名または UID] /bin/bash

でログインする。

コンテナ名でログインできないときは、以下コマンドで一覧を参照してコンテナIDを指定するとうまくいった。

docker ps

取得したコンテナIDを使って

docker exec -it [コンテナID] /bin/bash

とすることでログインできる。

75
77
2

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
75
77

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?