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?

サクッとdockerで試すときのコマンドたち

Last updated at Posted at 2021-04-20

docker作り込んでるときは覚えてるだけど、久しぶりにhelperとかない環境でいつもググってしまうのでメモ。

docker pull golang # イメージ取得
docker run -itd golang # コンテナ起動
docker attach {コンテナID} # シェル的なもので接続
# 上のコマンドでREPL(対話環境)になってしまう場合(nodeのベースイメージなど)は、以下のコマンドでシェルを起動できる
docker exec -it {コンテナID} /bin/bash
docker stop {コンテナID} # コンテナ停止

コンテナ名はdocker run後にdocker psで取得可能

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?