diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cfb5a2a..6f65f06 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,6 +23,16 @@ jobs: dockerfile: Dockerfile publish: true + python-root: + name: Python (root) + needs: python + uses: ./.github/workflows/_docker-build-deploy.yml + with: + image-name: tna-python-root + docker-context: docker/tna-python-root + dockerfile: Dockerfile + publish: true + python-django: name: Python Django needs: python @@ -32,3 +42,13 @@ jobs: docker-context: docker/tna-python-django dockerfile: Dockerfile publish: true + + python-django-root: + name: Python Django (root) + needs: python-django + uses: ./.github/workflows/_docker-build-deploy.yml + with: + image-name: tna-python-django-root + docker-context: docker/tna-python-django-root + dockerfile: Dockerfile + publish: true diff --git a/.github/workflows/remove-untagged.yml b/.github/workflows/remove-untagged.yml index 306f680..a3ae8d2 100644 --- a/.github/workflows/remove-untagged.yml +++ b/.github/workflows/remove-untagged.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image-name: [tna-python, tna-python-django] + image-name: [tna-python, tna-python-root, tna-python-django, tna-python-django-root] env: PER_PAGE: 100 steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1edc800..3699728 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,16 @@ jobs: dockerfile: Dockerfile publish: false + python-root: + name: Python (root) + needs: python + uses: ./.github/workflows/_docker-build-deploy.yml + with: + image-name: tna-python-root + docker-context: docker/tna-python-root + dockerfile: Dockerfile + publish: false + python-django: name: Python Django needs: python @@ -29,3 +39,13 @@ jobs: docker-context: docker/tna-python-django dockerfile: Dockerfile publish: false + + python-django-root: + name: Python Django (root) + needs: python-django + uses: ./.github/workflows/_docker-build-deploy.yml + with: + image-name: tna-python-django-root + docker-context: docker/tna-python-django-root + dockerfile: Dockerfile + publish: false diff --git a/docker/tna-python-django-root/Dockerfile b/docker/tna-python-django-root/Dockerfile new file mode 100644 index 0000000..2317bdc --- /dev/null +++ b/docker/tna-python-django-root/Dockerfile @@ -0,0 +1,8 @@ +ARG BASE_IMAGE_TAG=latest +FROM ghcr.io/nationalarchives/tna-python-django:"$BASE_IMAGE_TAG" + +# ========================================== +# Switch to the root user which allows us to +# have full access to the file system +# ========================================== +USER root diff --git a/docker/tna-python-root/Dockerfile b/docker/tna-python-root/Dockerfile new file mode 100644 index 0000000..9d5fe1b --- /dev/null +++ b/docker/tna-python-root/Dockerfile @@ -0,0 +1,8 @@ +ARG BASE_IMAGE_TAG=latest +FROM ghcr.io/nationalarchives/tna-python:"$BASE_IMAGE_TAG" + +# ========================================== +# Switch to the root user which allows us to +# have full access to the file system +# ========================================== +USER root