Skip to content

Commit 4147b68

Browse files
authored
feat(docker): Drop nginx debian (#12998)
1 parent 798a296 commit 4147b68

9 files changed

Lines changed: 19 additions & 114 deletions

.github/workflows/build-docker-images-for-testing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
os: [alpine, debian]
2525
platform: ["${{ inputs.platform }}"]
2626
exclude:
27+
- docker-image: nginx
28+
os: debian
2729
- docker-image: integration-tests
2830
os: alpine
2931
- docker-image: integration-tests

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Load docker images
6262
timeout-minutes: 10
6363
run: |-
64-
docker load -i built-docker-image/nginx-${{ matrix.os }}-linux-amd64_img
64+
docker load -i built-docker-image/nginx-alpine-linux-amd64_img
6565
docker load -i built-docker-image/django-${{ matrix.os }}-linux-amd64_img
6666
docker load -i built-docker-image/integration-tests-debian-linux-amd64_img
6767
docker images
@@ -73,14 +73,14 @@ jobs:
7373
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
7474
env:
7575
DJANGO_VERSION: ${{ matrix.os }}
76-
NGINX_VERSION: ${{ matrix.os }}
76+
NGINX_VERSION: alpine
7777

7878
- name: Initialize
7979
timeout-minutes: 10
8080
run: docker compose up --no-deps --exit-code-from initializer initializer
8181
env:
8282
DJANGO_VERSION: ${{ matrix.os }}
83-
NGINX_VERSION: ${{ matrix.os }}
83+
NGINX_VERSION: alpine
8484

8585
- name: Integration tests
8686
timeout-minutes: 10

.github/workflows/k8s-tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ jobs:
5757
timeout-minutes: 15
5858
run: |-
5959
eval $(minikube docker-env)
60-
docker load -i built-docker-image/nginx-${{ matrix.os }}-linux-amd64_img
60+
docker load -i built-docker-image/nginx-alpine-linux-amd64_img
6161
docker load -i built-docker-image/django-${{ matrix.os }}-linux-amd64_img
62+
docker tag defectdojo/defectdojo-nginx:alpine defectdojo/defectdojo-nginx:latest
63+
docker tag defectdojo/defectdojo-django:${{ matrix.os }} defectdojo/defectdojo-django:latest
6264
docker images
6365
6466
- name: Configure HELM repos
@@ -87,8 +89,7 @@ jobs:
8789
--set initializer.keepSeconds="-1" \
8890
${{ env[matrix.databases] }} \
8991
${{ env[matrix.brokers] }} \
90-
--set createSecret=true \
91-
--set tag=${{ matrix.os }}
92+
--set createSecret=true
9293
9394
- name: Check deployment status
9495
if: always()

.github/workflows/release-x-manual-docker-containers.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
matrix:
3737
docker-image: [django, nginx]
3838
os: [alpine, debian]
39+
exclude:
40+
- docker-image: nginx
41+
os: debian
3942
steps:
4043
# Replace slashes so we can use this in filenames
4144
- name: Set-platform

.github/workflows/release-x-manual-merge-container-digests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
matrix:
3232
docker-image: [django, nginx]
3333
os: [alpine, debian]
34-
34+
exclude:
35+
- docker-image: nginx
36+
os: debian
3537
steps:
3638
# deduce docker org name from git repo to make the build also work in forks
3739
- id: Set-docker-org
@@ -69,14 +71,14 @@ jobs:
6971
7072
# debian images are the default / official ones, so these get the os-less tag
7173
- name: Tag Debian with os-less tags
72-
if: ${{ matrix.os == 'debian' }}
74+
if: ${{ (matrix.docker-image == 'django' && matrix.os == 'debian') || (matrix.docker-image == 'nginx' && matrix.os == 'alpine') }}
7375
working-directory: ${{ runner.temp }}/digests
7476
run: |
7577
set -x
7678
docker buildx imagetools create -t "${{ env.DOCKER_ORG }}/defectdojo-${{ matrix.docker-image}}:${{ inputs.release_number }}" ${{ env.DOCKER_ORG }}/defectdojo-${{ matrix.docker-image}}:${{ inputs.release_number }}-${{ matrix.os }}
7779
7880
# just for logging
7981
- name: Inspect default images
80-
if: ${{ matrix.os == 'debian' }}
82+
if: ${{ (matrix.docker-image == 'django' && matrix.os == 'debian') || (matrix.docker-image == 'nginx' && matrix.os == 'alpine') }}
8183
run: |
8284
docker buildx imagetools inspect ${{ env.DOCKER_ORG }}/defectdojo-${{ matrix.docker-image}}:${{ inputs.release_number }}

.github/workflows/release-x-manual-tag-as-latest.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ jobs:
4545
- name: Set up Docker Buildx
4646
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
4747

48-
# debian images are the default / official ones, and these were already tagged, so these get the latest tag
49-
- name: Tag Debian with latest tags
48+
- name: Tag with latest tags
5049
run: |
5150
set -x
5251
docker buildx imagetools create -t "${{ env.DOCKER_ORG }}/defectdojo-${{ matrix.docker-image}}:latest" ${{ env.DOCKER_ORG }}/defectdojo-${{ matrix.docker-image}}:${{ inputs.release_number }}

.github/workflows/rest-framework-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
- name: Load docker images
4141
timeout-minutes: 10
4242
run: |-
43-
docker load -i built-docker-image/nginx-${{ matrix.os }}-${{ env.PLATFORM }}_img
4443
docker load -i built-docker-image/django-${{ matrix.os }}-${{ env.PLATFORM }}_img
4544
docker images
4645

Dockerfile.nginx-debian

Lines changed: 0 additions & 101 deletions
This file was deleted.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
nginx:
1111
build:
1212
context: ./
13-
dockerfile: "Dockerfile.nginx-${DEFECT_DOJO_OS:-debian}"
13+
dockerfile: "Dockerfile.nginx-alpine"
1414
image: "defectdojo/defectdojo-nginx:${NGINX_VERSION:-latest}"
1515
depends_on:
1616
uwsgi:

0 commit comments

Comments
 (0)