Skip to content

Commit e19667b

Browse files
committed
Revert "Build images with buildkit for deterministic hashes"
This reverts commit e8f7637.
1 parent 5ed2d6d commit e19667b

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

src/confcom/azext_confcom/tests/latest/test_confcom_containers_from_image.py

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
# --------------------------------------------------------------------------------------------
55

66
import json
7-
import os
8-
import subprocess
97
import tempfile
8+
import docker
109
import pytest
1110
import portalocker
1211

@@ -24,27 +23,18 @@
2423
SAMPLES_ROOT = CONFCOM_DIR / "samples" / "images"
2524
DOCKER_LOCK = Path(tempfile.gettempdir()) / "confcom-docker.lock"
2625

26+
2727
@pytest.fixture(scope="session", autouse=True)
2828
def build_test_containers():
2929

30-
env = os.environ.copy()
31-
env["DOCKER_BUILDKIT"] = "1"
32-
30+
docker_client = docker.from_env()
3331
with portalocker.Lock(DOCKER_LOCK.as_posix(), timeout=20):
3432
for image_sample in SAMPLES_ROOT.iterdir():
35-
subprocess.run(
36-
[
37-
"docker",
38-
"build",
39-
str(image_sample),
40-
"-t",
41-
f"confcom_test_{image_sample.name}",
42-
"--quiet",
43-
],
44-
env=env,
45-
stdout=subprocess.DEVNULL,
46-
stderr=subprocess.DEVNULL,
47-
check=True,
33+
docker_client.images.build(
34+
path=str(image_sample),
35+
tag=f"confcom_test_{image_sample.name}",
36+
quiet=True,
37+
rm=True,
4838
)
4939

5040
yield
@@ -79,4 +69,4 @@ def test_containers_from_image(sample_directory: str, platform: str):
7969
expected_container_def,
8070
ignore_order=True,
8171
)
82-
assert diff == {}, diff
72+
assert diff == {}, diff

src/confcom/samples/images/working_dir/aci_container.inc.rego

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "confcom_test_working_dir",
44
"layers": [
55
"8b4664979ffe3c5188efbbbb30e31716c03bfe880f15f455be0fc3beb4741de9",
6-
"1c4128b7270b18b052aff3f68a5611873057aa0b9ce3acfbf273494e67c63254"
6+
"eff9550216100f194b7f04d12ae70e5511ffd7360eec6b947197176701397e60"
77
],
88
"mounts": [
99
{

0 commit comments

Comments
 (0)