From 2098878ff68af42ee44792b36d4908a4107d6738 Mon Sep 17 00:00:00 2001 From: Meng Ye <4025839+jk2K@users.noreply.github.com> Date: Thu, 25 Jul 2019 21:53:41 +0800 Subject: [PATCH] add network field to build configuration --- compose/compose-file/index.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index 9d5d9368b030..690be38d1a7e 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -372,6 +372,18 @@ build: target: prod ``` +#### network + +> Added in [version 3.4](compose-versioning.md#version-34) file format + +Build the image inside the specified network, Docker doesn't resolve the project name for the build network, it should be specified explicitly `` -> `_` + +```yaml +build: + context: . + network: example_default +``` + ### cap_add, cap_drop Add or drop container capabilities.