Skip to content

Commit 147364a

Browse files
authored
DRIVERS-3208 Option to avoid docker login for local testing (#661)
1 parent 695aae9 commit 147364a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.evergreen/docker/run-server.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ ARGS+=" -e REQUIRE_API_VERSION=$REQUIRE_API_VERSION"
6666
ARGS+=" -e DISABLE_TEST_COMMANDS=$DISABLE_TEST_COMMANDS"
6767
ARGS+=" -e MONGODB_DOWNLOAD_URL=$MONGODB_DOWNLOAD_URL"
6868

69+
# Use the ECR pull-through registry for Ubuntu images when running in CI.
70+
if [[ "$IMAGE" =~ ^ubuntu.* ]] && [[ -n "${CI:-}" ]]; then
71+
ARGS+=" -e IMAGE_NAME=901841024863.dkr.ecr.us-east-1.amazonaws.com/dockerhub/library/$IMAGE"
72+
fi
73+
6974
# Expose the required ports.
7075
if [ "$TOPOLOGY" == "server" ]; then
7176
ARGS+=" -p 27017:27017"

.evergreen/docker/ubuntu20.04/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM 901841024863.dkr.ecr.us-east-1.amazonaws.com/dockerhub/library/ubuntu:20.04
1+
ARG IMAGE_NAME=ubuntu:20.04
2+
FROM $IMAGE_NAME
23

34
RUN export DEBIAN_FRONTEND=noninteractive && \
45
apt-get -qq update && apt-get -qq -y install --no-install-recommends \

0 commit comments

Comments
 (0)