Skip to content

Commit

Permalink
reduce the size of forklift-virt-v2v-stub
Browse files Browse the repository at this point in the history
Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Feb 9, 2024
1 parent 4e54f72 commit b58609c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build_tests_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ export REGISTRY_TAG=latest

# Copy the stub-images under the bazel workspace
cp -fr ${SCRIPT_DIR}/stub-images virt-v2v/cold
bazel run --package_path=virt-v2v/cold stub-images:push-forklift-virt-v2v-stub --verbose_failures
bazel run --strategy_regexp="RunAndCommitLayer stub-images/virt-v2v-stub/qemu-img-layer.tar"=processwrapper-sandbox --package_path=virt-v2v/cold stub-images:push-forklift-virt-v2v-stub --verbose_failures
bazel run --strategy_regexp="Action stub-images/vddk-test-vmdk/convert_to_vmdk/tmp/cirros.vmdk"=processwrapper-sandbox --package_path=virt-v2v/cold stub-images:push-vddk-test-vmdk --verbose_failures
12 changes: 11 additions & 1 deletion stub-images/virt-v2v-stub/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ load(
"@io_bazel_rules_docker//container:container.bzl",
"container_image",
)
load("@io_bazel_rules_docker//docker/util:run.bzl", "container_run_and_commit_layer")

container_run_and_commit_layer(
name = "qemu-img",
commands = [
"dnf -y install qemu-img",
],
image = "@centos-stream-9//image",
)

container_image(
name = "forklift-virt-v2v-stub",
base = "//:forklift-virt-v2v",
base = "@centos-stream-9//image",
directory = "/usr/local/bin/",
empty_dirs = ["/disks"],
entrypoint = ["/usr/local/bin/entrypoint"],
env = {"LIBGUESTFS_BACKEND": "direct"},
files = ["bin/entrypoint"],
layers = [":qemu-img"],
user = "1001",
visibility = ["//visibility:public"],
)

0 comments on commit b58609c

Please sign in to comment.