mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-17 18:51:50 +02:00
FIXUP: Add easier method to generate Dockerfile
This commit is contained in:
parent
afc5e8e636
commit
725ce3b9c7
4 changed files with 9 additions and 5 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
@ -487,8 +487,9 @@ jobs:
|
||||||
|
|
||||||
- name: Verify that the Dockerfile matches the commited template and params
|
- name: Verify that the Dockerfile matches the commited template and params
|
||||||
run: |-
|
run: |-
|
||||||
poetry run jinja2 Dockerfile.in Dockerfile.env > out
|
cp Dockerfile Dockerfile.orig
|
||||||
diff Dockerfile out
|
make Dockerfile
|
||||||
|
diff Dockerfile.orig Dockerfile
|
||||||
|
|
||||||
- name: Build Dangerzone container image
|
- name: Build Dangerzone container image
|
||||||
run: |
|
run: |
|
||||||
|
|
2
.github/workflows/scan.yml
vendored
2
.github/workflows/scan.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
date=$(date "+%Y%m%d")
|
date=$(date "+%Y%m%d")
|
||||||
sed -i "s/DEBIAN_ARCHIVE_DATE=[0-9]\+/DEBIAN_ARCHIVE_DATE=${date}/" Dockerfile.env
|
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
|
- name: Build container image
|
||||||
run: python3 ./install/common/build-image.py --runtime docker --no-save
|
run: python3 ./install/common/build-image.py --runtime docker --no-save
|
||||||
- name: Get image tag
|
- name: Get image tag
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -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 -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)
|
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
|
.PHONY: build-clean
|
||||||
build-clean:
|
build-clean:
|
||||||
doit clean
|
doit clean
|
||||||
|
|
|
@ -37,7 +37,7 @@ If you update these values in `Dockerfile.env`, you must also create a new
|
||||||
Dockerfile with:
|
Dockerfile with:
|
||||||
|
|
||||||
```
|
```
|
||||||
poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile
|
make Dockerfile
|
||||||
```
|
```
|
||||||
|
|
||||||
Updating `Dockerfile` without bumping `Dockerfile.in` is detected and should
|
Updating `Dockerfile` without bumping `Dockerfile.in` is detected and should
|
||||||
|
|
Loading…
Reference in a new issue