Skip to content

Commit a2e936b

Browse files
authored
try buildah to replace kaniko (#35289)
* try buildah to replace kaniko * trigger post-commit
1 parent facdc4e commit a2e936b

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run",
3-
"modification": 3
3+
"modification": 4
44
}

sdks/python/apache_beam/runners/portability/sdk_container_builder.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,18 @@ def _invoke_docker_build_and_push(self, container_image_name):
247247
build.options.machineType = self._cloud_build_machine_type
248248
build.steps = []
249249
step = cloudbuild.BuildStep()
250-
step.name = 'gcr.io/kaniko-project/executor:latest'
251-
# Disable compression caching to allow for large images to be cached.
252-
# See: https://github.com/GoogleContainerTools/kaniko/issues/1669
250+
step.name = 'quay.io/buildah/stable:latest'
251+
step.entrypoint = 'sh'
253252
step.args = [
254-
'--destination=' + container_image_name,
255-
'--cache=true',
256-
'--compressed-caching=false',
253+
'-c',
254+
# The --storage-driver=vfs option is used to run buildah in a
255+
# rootless environment.
256+
(
257+
'buildah bud --storage-driver=vfs -t {0} . && '
258+
'buildah push --storage-driver=vfs {0} docker://{0}'
259+
).format(container_image_name),
257260
]
258261
step.dir = SOURCE_FOLDER
259-
260262
build.steps.append(step)
261263

262264
source = cloudbuild.Source()

0 commit comments

Comments
 (0)