diff --git a/.evergreen/config_generator/components/docker_build.py b/.evergreen/config_generator/components/docker_build.py index 664aa26e1a..30aa49c9e7 100644 --- a/.evergreen/config_generator/components/docker_build.py +++ b/.evergreen/config_generator/components/docker_build.py @@ -30,6 +30,7 @@ class DockerImageBuild(Function): script='''\ set -o errexit set -o pipefail + docker login -u "${ARTIFACTORY_USER}" --password-stdin artifactory.corp.mongodb.com <<<"${ARTIFACTORY_PASSWORD}" set -x echo "Building Alpine Docker image" make -C extras/docker/alpine3.19 nocachebuild test diff --git a/.evergreen/generated_configs/functions.yml b/.evergreen/generated_configs/functions.yml index 6b3dc7e3d0..a98ac23d5b 100644 --- a/.evergreen/generated_configs/functions.yml +++ b/.evergreen/generated_configs/functions.yml @@ -268,6 +268,7 @@ functions: - | set -o errexit set -o pipefail + docker login -u "${ARTIFACTORY_USER}" --password-stdin artifactory.corp.mongodb.com <<<"${ARTIFACTORY_PASSWORD}" set -x echo "Building Alpine Docker image" make -C extras/docker/alpine3.19 nocachebuild test diff --git a/extras/docker/alpine3.19/Dockerfile b/extras/docker/alpine3.19/Dockerfile index 4346d3323b..6753368ec0 100644 --- a/extras/docker/alpine3.19/Dockerfile +++ b/extras/docker/alpine3.19/Dockerfile @@ -1,7 +1,7 @@ # DO NOT EDIT THIS FILE DIRECTLY # This file was auto generated from the template file Dockerfile.j2 using the generate.py script -FROM public.ecr.aws/docker/library/alpine:3.19 AS builder +FROM artifactory.corp.mongodb.com/dockerhub/library/alpine:3.19 AS builder ARG MONGOCXX_VERSION=3.10.1 ARG MONGOC_VERSION=1.27.1 @@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC cmake --build mongocxx-build --config RelWithDebInfo && \ cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx -FROM public.ecr.aws/docker/library/alpine:3.19 +FROM artifactory.corp.mongodb.com/dockerhub/library/alpine:3.19 RUN apk update && apk upgrade && apk add --no-cache openssl3 libstdc++ libc6-compat diff --git a/extras/docker/bookworm/Dockerfile b/extras/docker/bookworm/Dockerfile index cba438944f..f45992a717 100644 --- a/extras/docker/bookworm/Dockerfile +++ b/extras/docker/bookworm/Dockerfile @@ -1,7 +1,7 @@ # DO NOT EDIT THIS FILE DIRECTLY # This file was auto generated from the template file Dockerfile.j2 using the generate.py script -FROM public.ecr.aws/docker/library/debian:12-slim AS builder +FROM artifactory.corp.mongodb.com/dockerhub/library/debian:12-slim AS builder ARG MONGOCXX_VERSION=3.10.1 ARG MONGOC_VERSION=1.27.1 @@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC cmake --build mongocxx-build --config RelWithDebInfo && \ cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx -FROM public.ecr.aws/docker/library/debian:12-slim +FROM artifactory.corp.mongodb.com/dockerhub/library/debian:12-slim RUN apt update && apt upgrade -y && apt install -y libssl3 && rm -rf /var/lib/apt/lists/* diff --git a/extras/docker/generate.py b/extras/docker/generate.py index adb26681f3..43521f2bf2 100755 --- a/extras/docker/generate.py +++ b/extras/docker/generate.py @@ -30,9 +30,9 @@ def render_template(template_filename, context): "redhat-ubi-9.4", ] base_image = { - "alpine3.19": "public.ecr.aws/docker/library/alpine:3.19", - "bookworm": "public.ecr.aws/docker/library/debian:12-slim", - "noble": "public.ecr.aws/docker/library/ubuntu:24.04", + "alpine3.19": "artifactory.corp.mongodb.com/dockerhub/library/alpine:3.19", + "bookworm": "artifactory.corp.mongodb.com/dockerhub/library/debian:12-slim", + "noble": "artifactory.corp.mongodb.com/dockerhub/library/ubuntu:24.04", "redhat-ubi-9.4": "registry.access.redhat.com/ubi9/ubi-minimal:9.4", } test_dependency_install_command = { diff --git a/extras/docker/noble/Dockerfile b/extras/docker/noble/Dockerfile index 7b1b1f36f5..a31cf2fa90 100644 --- a/extras/docker/noble/Dockerfile +++ b/extras/docker/noble/Dockerfile @@ -1,7 +1,7 @@ # DO NOT EDIT THIS FILE DIRECTLY # This file was auto generated from the template file Dockerfile.j2 using the generate.py script -FROM public.ecr.aws/docker/library/ubuntu:24.04 AS builder +FROM artifactory.corp.mongodb.com/dockerhub/library/ubuntu:24.04 AS builder ARG MONGOCXX_VERSION=3.10.1 ARG MONGOC_VERSION=1.27.1 @@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC cmake --build mongocxx-build --config RelWithDebInfo && \ cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx -FROM public.ecr.aws/docker/library/ubuntu:24.04 +FROM artifactory.corp.mongodb.com/dockerhub/library/ubuntu:24.04 RUN apt update && apt upgrade -y && apt install -y libssl3 && rm -rf /var/lib/apt/lists/*