Skip to content

Commit e755b53

Browse files
authored
Add an instruction for using Docker buildx when building containers. (#37706)
* Add an instruction for using docker buildx * Also update instructions that containers must be pushed. * formatting * formatting
1 parent 9ee4fe6 commit e755b53

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

.agent/skills/gradle-build/SKILL.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,32 @@ applyJavaNature(
154154
./gradlew :sdks:java:container:java11:docker
155155

156156
# Build Python SDK container
157-
./gradlew :sdks:python:container:py39:docker
157+
./gradlew :sdks:python:container:py312:docker
158158

159-
# With custom repository
159+
# Build and push a container into a custom repository
160160
./gradlew :sdks:java:container:java11:docker \
161161
-Pdocker-repository-root=gcr.io/project \
162-
-Pdocker-tag=custom
162+
-Pdocker-tag=custom \
163+
-Ppush-containers
164+
```
165+
166+
If a `:docker` task produces logs that contain the following:
167+
168+
```
169+
WARNING: No output specified with docker-container driver.
170+
Build result will only remain in the build cache.
171+
```
172+
173+
then you must use `-PuseDockerBuildx` when running `:docker` tasks
174+
in this environment. For example:
175+
176+
```
177+
# Build and push a go container into a custom repository
178+
./gradlew :sdks:go:container:docker \
179+
-Pdocker-repository-root=gcr.io/project \
180+
-Pdocker-tag=custom \
181+
-Ppush-containers \
182+
-PuseDockerBuildx
163183
```
164184

165185
## Dependency Management

.agent/skills/python-development/SKILL.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,18 @@ pip install build && python -m build --sdist
123123
./gradlew :sdks:python:bdistPy311linux # For Python 3.11 on Linux
124124
```
125125

126-
### Build SDK Container
126+
### Build and Push SDK Container Image
127127
```bash
128-
./gradlew :sdks:python:container:py39:docker \
129-
-Pdocker-repository-root=gcr.io/your-project -Pdocker-tag=custom
128+
./gradlew :sdks:python:container:py311:docker \
129+
-Pdocker-repository-root=gcr.io/your-project/your-name \
130+
-Pdocker-tag=custom \
131+
-Ppush-containers
132+
133+
# Container image will be pushed to: gcr.io/your-project/your-name/beam_python3.11_sdk:custom
130134
```
131135

136+
To use this container image, supply it via `--sdk_container_image`.
137+
132138
## Running Pipelines with Modified Code
133139

134140
```bash

0 commit comments

Comments
 (0)