Skip to content

Commit c535a83

Browse files
authored
Use Artifactory instead of Amazon ECR to obtain Docker images (#1272)
1 parent 260746f commit c535a83

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

Diff for: .evergreen/config_generator/components/docker_build.py

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class DockerImageBuild(Function):
3030
script='''\
3131
set -o errexit
3232
set -o pipefail
33+
docker login -u "${ARTIFACTORY_USER}" --password-stdin artifactory.corp.mongodb.com <<<"${ARTIFACTORY_PASSWORD}"
3334
set -x
3435
echo "Building Alpine Docker image"
3536
make -C extras/docker/alpine3.19 nocachebuild test

Diff for: .evergreen/generated_configs/functions.yml

+1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ functions:
268268
- |
269269
set -o errexit
270270
set -o pipefail
271+
docker login -u "${ARTIFACTORY_USER}" --password-stdin artifactory.corp.mongodb.com <<<"${ARTIFACTORY_PASSWORD}"
271272
set -x
272273
echo "Building Alpine Docker image"
273274
make -C extras/docker/alpine3.19 nocachebuild test

Diff for: extras/docker/alpine3.19/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DO NOT EDIT THIS FILE DIRECTLY
22
# This file was auto generated from the template file Dockerfile.j2 using the generate.py script
33

4-
FROM public.ecr.aws/docker/library/alpine:3.19 AS builder
4+
FROM artifactory.corp.mongodb.com/dockerhub/library/alpine:3.19 AS builder
55

66
ARG MONGOCXX_VERSION=3.10.1
77
ARG MONGOC_VERSION=1.27.1
@@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC
6060
cmake --build mongocxx-build --config RelWithDebInfo && \
6161
cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx
6262

63-
FROM public.ecr.aws/docker/library/alpine:3.19
63+
FROM artifactory.corp.mongodb.com/dockerhub/library/alpine:3.19
6464

6565
RUN apk update && apk upgrade && apk add --no-cache openssl3 libstdc++ libc6-compat
6666

Diff for: extras/docker/bookworm/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DO NOT EDIT THIS FILE DIRECTLY
22
# This file was auto generated from the template file Dockerfile.j2 using the generate.py script
33

4-
FROM public.ecr.aws/docker/library/debian:12-slim AS builder
4+
FROM artifactory.corp.mongodb.com/dockerhub/library/debian:12-slim AS builder
55

66
ARG MONGOCXX_VERSION=3.10.1
77
ARG MONGOC_VERSION=1.27.1
@@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC
6060
cmake --build mongocxx-build --config RelWithDebInfo && \
6161
cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx
6262

63-
FROM public.ecr.aws/docker/library/debian:12-slim
63+
FROM artifactory.corp.mongodb.com/dockerhub/library/debian:12-slim
6464

6565
RUN apt update && apt upgrade -y && apt install -y libssl3 && rm -rf /var/lib/apt/lists/*
6666

Diff for: extras/docker/generate.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def render_template(template_filename, context):
3030
"redhat-ubi-9.4",
3131
]
3232
base_image = {
33-
"alpine3.19": "public.ecr.aws/docker/library/alpine:3.19",
34-
"bookworm": "public.ecr.aws/docker/library/debian:12-slim",
35-
"noble": "public.ecr.aws/docker/library/ubuntu:24.04",
33+
"alpine3.19": "artifactory.corp.mongodb.com/dockerhub/library/alpine:3.19",
34+
"bookworm": "artifactory.corp.mongodb.com/dockerhub/library/debian:12-slim",
35+
"noble": "artifactory.corp.mongodb.com/dockerhub/library/ubuntu:24.04",
3636
"redhat-ubi-9.4": "registry.access.redhat.com/ubi9/ubi-minimal:9.4",
3737
}
3838
test_dependency_install_command = {

Diff for: extras/docker/noble/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DO NOT EDIT THIS FILE DIRECTLY
22
# This file was auto generated from the template file Dockerfile.j2 using the generate.py script
33

4-
FROM public.ecr.aws/docker/library/ubuntu:24.04 AS builder
4+
FROM artifactory.corp.mongodb.com/dockerhub/library/ubuntu:24.04 AS builder
55

66
ARG MONGOCXX_VERSION=3.10.1
77
ARG MONGOC_VERSION=1.27.1
@@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC
6060
cmake --build mongocxx-build --config RelWithDebInfo && \
6161
cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx
6262

63-
FROM public.ecr.aws/docker/library/ubuntu:24.04
63+
FROM artifactory.corp.mongodb.com/dockerhub/library/ubuntu:24.04
6464

6565
RUN apt update && apt upgrade -y && apt install -y libssl3 && rm -rf /var/lib/apt/lists/*
6666

0 commit comments

Comments
 (0)