# Shared helpers for the script/docker-* entry points and script/integration-test. Source, don't run. # # The docker-container buildx builder works around an LXC/AppArmor bug in runc # (opencontainers/runc#5007) that fails RUN steps during image build. use_builder() { local builder=tbd-builder if ! docker buildx inspect "$builder" >/dev/null 2>&1; then docker buildx create --name "$builder" \ --driver docker-container \ --buildkitd-config buildkitd.toml fi docker buildx use "$builder" } # Builds the app image with the test and coverage deps pre-fetched, tagged tbd-unit. build_unit_image() { use_builder docker buildx build --load --build-arg DEPS_ALIASES=test:cov -t tbd-unit . } # Builds the UI's test image (Node + JDK, the UI's deps, sources and tests), tagged tbd-ui-test. build_ui_test_image() { use_builder docker buildx build --load --target ui-test -t tbd-ui-test . }