mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-17 10:41:49 +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
|
||||
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: |
|
||||
|
|
2
.github/workflows/scan.yml
vendored
2
.github/workflows/scan.yml
vendored
|
@ -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
|
||||
|
|
5
Makefile
5
Makefile
|
@ -19,7 +19,7 @@ lint: ## Check the code for linting, formatting, and typing issues with ruff and
|
|||
.PHONY: fix
|
||||
fix: ## apply all the suggestions from ruff
|
||||
ruff check --fix
|
||||
ruff format
|
||||
ruff format
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue