Skip to content

Commit

Permalink
Add debian version to build step to fix compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JackWilb committed Jan 22, 2024
1 parent 73ac1d6 commit 97a8160
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
fail-fast: false
matrix:
software-versions: [
{"python-version": 3.9, "django-version": 3.2},
{"python-version": 3.12, "django-version": 4.2}
{"python-version": 3.9, "django-version": 3.2, "debian-version": "bullseye"},
{"python-version": 3.11, "django-version": 4.2, "debian-version": "bookworm"}
]
platform: [amd64]
runs-on: ubuntu-latest
Expand All @@ -31,6 +31,9 @@ jobs:
- name: Replace Python Version in Dockerfile
run: sed -i "s/PYTHON_VERSION/${{ matrix.software-versions.python-version }}/g" Dockerfile

- name: Replace Debian Version in Dockerfile
run: sed -i "s/DEBIAN_VERSION/${{ matrix.software-versions.debian-version }}/g" Dockerfile

- name: Replace the Django Version in Dockerfile
run: sed -i "s/DJANGO_VERSION/${{ matrix.software-versions.django-version }}/g" Dockerfile

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:PYTHON_VERSION-slim
FROM python:PYTHON_VERSION-slim-DEBIAN_VERSION
LABEL org.opencontainers.image.source="https://github.com/visdesignlab/django-image"

ENV PYTHONUNBUFFERED 1
Expand Down

0 comments on commit 97a8160

Please sign in to comment.