mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
@@ -17,12 +17,12 @@ In the former case, the whole path is used as a Docker context to execute a Dock
|
||||
`Dockerfile` at the root of the directory. The path can be absolute or relative. If it is relative, it is resolved
|
||||
from the Compose file's parent folder. If it is absolute, the path prevents the Compose file from being portable so Compose displays a warning.
|
||||
|
||||
In the later case, build arguments can be specified, including an alternate `Dockerfile` location. The path can be absolute or relative. If it is relative, it is resolved
|
||||
In the latter case, build arguments can be specified, including an alternate `Dockerfile` location. The path can be absolute or relative. If it is relative, it is resolved
|
||||
from the Compose file's parent folder. If it is absolute, the path prevents the Compose file from being portable so Compose displays a warning.
|
||||
|
||||
## Using `build` and `image`
|
||||
|
||||
When Compose is confronted with both a `build` subsection for a service and an `image` attribute. It follows the rules defined by the [`pull_policy`](05-services.md#pull_policy) attribute.
|
||||
When Compose is confronted with both a `build` subsection for a service and an `image` attribute, it follows the rules defined by the [`pull_policy`](05-services.md#pull_policy) attribute.
|
||||
|
||||
If `pull_policy` is missing from the service definition, Compose attempts to pull the image first and then builds from source if the image isn't found in the registry or platform cache.
|
||||
|
||||
@@ -550,4 +550,4 @@ Composes reports an error in the following cases:
|
||||
context: "."
|
||||
platforms:
|
||||
- "linux/arm64"
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user