doc: Generate docs

This commit is contained in:
Anton Ovchinnikov
2025-11-05 23:48:30 +01:00
parent abea3e229e
commit 06d988583d
6 changed files with 60 additions and 18 deletions
+44 -5
View File
@@ -2,18 +2,57 @@
Build services from a Compose file.
## Synopsis
Build images for services from a Compose file using local Docker.
By default, built images remain on the local Docker host. Use --push to upload them
to cluster machines or --push-registry to upload them to external registries.
```
uc build [FLAGS] [SERVICE...] [flags]
```
## Examples
```
# Build all services that have a build section in compose.yaml.
uc build
# Build specific services that have a build section.
uc build web api
# Build services and push images to all cluster machines or service x-machines if specified.
uc build --push
# Build services and push images to specific machines.
uc build --push -m machine1,machine2
# Build services and push images to external registries (e.g., Docker Hub).
uc build --push-registry
# Build services with build arguments, pull newer base images before building, and don't use cache.
uc build --build-arg NODE_VERSION=24 --build-arg ENV=production --no-cache --pull
```
## Options
```
-f, --file strings One or more Compose files to build (default compose.yaml)
-h, --help help for build
-n, --no-cache Do not use cache when building images. (default false)
-p, --profile strings One or more Compose profiles to enable.
-P, --push Push built images to the registry after building. (default false)
--build-arg stringArray Set a build-time variable for services. Used in Dockerfiles that declare the variable with ARG.
Can be specified multiple times. Format: --build-arg VAR=VALUE
--check Check the build configuration for services without building them.
-c, --context string Name of the cluster context. (default is the current context)
--deps Also build services declared as dependencies of the selected services.
-f, --file strings One or more Compose files to build. (default compose.yaml)
-h, --help help for build
-m, --machine strings Machine names or IDs to push the built images to (requires --push).
Can be specified multiple times or as a comma-separated list. (default is all machines or x-machines)
--no-cache Do not use cache when building images.
-p, --profile strings One or more Compose profiles to enable.
--pull Always attempt to pull newer versions of base images before building.
--push Upload the built images to cluster machines after building.
Use --machine to specify which machines. (default is all machines)
--push-registry Upload the built images to external registries (e.g., Docker Hub) after building.
```
## Options inherited from parent commands