Skip to content

Commit

Permalink
Add rooted versions of each image
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Oct 13, 2023
1 parent f9ff1f1 commit 4d3312e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/remove-untagged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 8 additions & 0 deletions docker/tna-python-django-root/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions docker/tna-python-root/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4d3312e

Please sign in to comment.