LoginSignup
0
0

More than 3 years have passed since last update.

docker composeで指定する要素メモ

Posted at

・要素
1--version:docker-composeのバージョン
2--立ち上げるコンテナの名前
3--image:立ち上げるコンテナのイメージ
4--ports:ポート番号
5--networks:どのネットワークに接続させるか
6--volumes:どこのvolumeにつないでデータを保存するか
7--environment:環境変数

・具体例
version:'3.7'
services:
nginx:
image:nginx:'バージョン数'
ports:
-8080:80
environment:

・contextで、docker-compose.ymlからみてdockerfileがどこにあるのかを指定して

・build
docker fileがおいてあディレクトリや、docker fileの名称を指定していると思っておけば良い?

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