From 1f1e3a5029d45b3d8c3c0cdcfa39f5b0fd486c4b Mon Sep 17 00:00:00 2001 From: Carmine Vassallo Date: Wed, 24 Jul 2024 10:27:23 +0200 Subject: [PATCH 1/2] SONAR-22607 Restore the usage of Ubuntu Jammy in the base image --- 10/community/Dockerfile | 2 +- 10/datacenter/app/Dockerfile | 2 +- 10/datacenter/search/Dockerfile | 2 +- 10/developer/Dockerfile | 2 +- 10/enterprise/Dockerfile | 2 +- 9/community/Dockerfile | 2 +- 9/datacenter/app/Dockerfile | 2 +- 9/datacenter/search/Dockerfile | 2 +- 9/developer/Dockerfile | 2 +- 9/enterprise/Dockerfile | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/10/community/Dockerfile b/10/community/Dockerfile index 5ac1486a..2ad9852b 100644 --- a/10/community/Dockerfile +++ b/10/community/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/10/datacenter/app/Dockerfile b/10/datacenter/app/Dockerfile index 70603bcb..818fc786 100644 --- a/10/datacenter/app/Dockerfile +++ b/10/datacenter/app/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/10/datacenter/search/Dockerfile b/10/datacenter/search/Dockerfile index f68b4007..3eb7d562 100644 --- a/10/datacenter/search/Dockerfile +++ b/10/datacenter/search/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/10/developer/Dockerfile b/10/developer/Dockerfile index c445ed46..4e8cba00 100644 --- a/10/developer/Dockerfile +++ b/10/developer/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/10/enterprise/Dockerfile b/10/enterprise/Dockerfile index b2c42230..7839db54 100644 --- a/10/enterprise/Dockerfile +++ b/10/enterprise/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/9/community/Dockerfile b/9/community/Dockerfile index 6754908e..44fe3290 100644 --- a/9/community/Dockerfile +++ b/9/community/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/9/datacenter/app/Dockerfile b/9/datacenter/app/Dockerfile index e439d618..34913f50 100644 --- a/9/datacenter/app/Dockerfile +++ b/9/datacenter/app/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/9/datacenter/search/Dockerfile b/9/datacenter/search/Dockerfile index 27463cac..37cc7741 100644 --- a/9/datacenter/search/Dockerfile +++ b/9/datacenter/search/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/9/developer/Dockerfile b/9/developer/Dockerfile index acd935b6..221a9d37 100644 --- a/9/developer/Dockerfile +++ b/9/developer/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube diff --git a/9/enterprise/Dockerfile b/9/enterprise/Dockerfile index b9bed371..541df19a 100644 --- a/9/enterprise/Dockerfile +++ b/9/enterprise/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube From 106a7371cfa902c7fd25d58d051d901419c7b392 Mon Sep 17 00:00:00 2001 From: Carmine Vassallo Date: Wed, 24 Jul 2024 10:56:03 +0200 Subject: [PATCH 2/2] Clean up the docker config file before login --- .cirrus/tasks.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.cirrus/tasks.yml b/.cirrus/tasks.yml index aeeb884e..a78ce50a 100644 --- a/.cirrus/tasks.yml +++ b/.cirrus/tasks.yml @@ -42,6 +42,7 @@ multi_arch_build_gcp_prod_task: - docker pull "${PUBLIC_IMAGE_NAME}:${CURRENT_VERSION}-datacenter-search" login_to_gcr_script: - export DOCKER_GCLOUD_PASSWORD=$(echo ${DOCKER_GCLOUD_SA_KEY} | base64 -d) + - rm -rf ~/.docker/config.json - docker login -u _json_key -p "$DOCKER_GCLOUD_PASSWORD" https://${GCLOUD_REGISTRY} tag_and_promote_script: - export CURRENT_MINOR_VERSION=$(echo ${CURRENT_VERSION} | cut -d '.' -f 1,2) @@ -68,6 +69,7 @@ multi_arch_build_gcp_staging_task: <<: *VM_TEMPLATE login_to_gcr_script: - export DOCKER_GCLOUD_PASSWORD=$(echo ${DOCKER_GCLOUD_SA_KEY} | base64 -d) + - rm -rf ~/.docker/config.json - docker login -u _json_key -p "$DOCKER_GCLOUD_PASSWORD" https://${GCLOUD_STAGING_REGISTRY} setup_multi_build_script: - docker run -t --rm --privileged tonistiigi/binfmt --install all @@ -106,6 +108,7 @@ multi_arch_build_task: ec2_instance: <<: *VM_TEMPLATE login_script: + - rm -rf ~/.docker/config.json - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD setup_script: - docker run -t --rm --privileged tonistiigi/binfmt --install all @@ -127,6 +130,7 @@ private_scan_task: ec2_instance: <<: *CI_SCANNER login_script: + - rm -rf ~/.docker/config.json - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD scan_script: - echo "docker.includes=${tag}" >> .cirrus/wss-unified-agent.config @@ -187,6 +191,7 @@ multi_arch_test_task: type: ${INSTANCE_TYPE} architecture: ${CIRRUS_ARCH} login_script: + - rm -rf ~/.docker/config.json - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD test_script: - echo "Test the ${STAGING_IMAGE_NAME}:${tag} image supporting linux/${CIRRUS_ARCH}"