Skip to content

Instantly share code, notes, and snippets.

@eiichi-worker
Created April 12, 2017 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eiichi-worker/f81d9effb71ace8a715b9b13af95af98 to your computer and use it in GitHub Desktop.
Save eiichi-worker/f81d9effb71ace8a715b9b13af95af98 to your computer and use it in GitHub Desktop.
dockerを改めて学習

dockerを改めて学習 その1

よく使うコマンド

docker ps

  • コンテナを見る

docker images

  • Imageを見る
  • スラッシュが入ってないものは基本的に公式なやつ(library/が省略されている)
  • 組織/イメージ名のことが多い
  • TAGはイメージのバージョン

docker run

  • コンテナを起動

docker pull

  • コンテナを持ってくる

オプション

  • -it コンテナに入る
  • -p ポートマップ コンテナのポート:ホストのポート

メモ

  • docker run hello-world

  • docker run amazonlinux

  • Apacheをフォアグラウンドで起動 apachectl -Dforground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment