FIXUP: Add easier method to generate Dockerfile

This commit is contained in:
Alex Pyrgiotis 2025-01-20 15:00:06 +02:00
parent afc5e8e636
commit 725ce3b9c7
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
4 changed files with 9 additions and 5 deletions

View file

@ -487,8 +487,9 @@ jobs:
- name: Verify that the Dockerfile matches the commited template and params
run: |-
poetry run jinja2 Dockerfile.in Dockerfile.env > out
diff Dockerfile out
cp Dockerfile Dockerfile.orig
make Dockerfile
diff Dockerfile.orig Dockerfile
- name: Build Dangerzone container image
run: |

View file

@ -26,7 +26,7 @@ jobs:
run: |
date=$(date "+%Y%m%d")
sed -i "s/DEBIAN_ARCHIVE_DATE=[0-9]\+/DEBIAN_ARCHIVE_DATE=${date}/" Dockerfile.env
poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile
make Dockerfile
- name: Build container image
run: python3 ./install/common/build-image.py --runtime docker --no-save
- name: Get image tag

View file

@ -47,6 +47,9 @@ test-large: test-large-init ## Run large test set
python -m pytest --tb=no tests/test_large_set.py::TestLargeSet -v $(JUNIT_FLAGS) --junitxml=$(TEST_LARGE_RESULTS)
python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS)
Dockerfile: Dockerfile.env Dockerfile.in
poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile
.PHONY: build-clean
build-clean:
doit clean

View file

@ -37,7 +37,7 @@ If you update these values in `Dockerfile.env`, you must also create a new
Dockerfile with:
```
poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile
make Dockerfile
```
Updating `Dockerfile` without bumping `Dockerfile.in` is detected and should