From 284a1ad888334bf32b6003f3ea25aeb164494ea7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 17 Oct 2023 07:52:50 -0500 Subject: [PATCH 1/7] GODRIVER-2989 Fix golang installation in Dockerfile --- Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 446ab1d5f2..094b61b3f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,16 +20,24 @@ RUN cd /root && bash ./install-libmongocrypt.sh # from the libmongocrypt build stage. FROM drivers-evergreen-tools +# Install common deps. RUN export DEBIAN_FRONTEND=noninteractive && \ export TZ=Etc/UTC && \ apt-get -qq update && \ - apt-get -qqy install --no-install-recommends \ - pkg-config \ + apt-get -qqy install --reinstall --no-install-recommends \ tzdata \ + ca-certificates \ + pkg-config \ + software-properties-common \ gpg \ apt-utils \ make && \ - apt-add-repository ppa:longsleep/golang-backports && \ + rm -rf /var/lib/apt/lists/* + +# Install golang from the golang-backports ppa. +RUN export DEBIAN_FRONTEND=noninteractive && \ + export TZ=Etc/UTC && \ + apt-add-repository "ppa:longsleep/golang-backports" && \ apt-get -qq update && \ apt-get -qqy install --no-install-recommends golang-go && \ rm -rf /var/lib/apt/lists/* From 749960e3beab5f56f837379c96de3c852c0073fb Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 17 Oct 2023 08:39:13 -0500 Subject: [PATCH 2/7] try setting LC_ALL --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 094b61b3f2..11678d3ae3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ # Install golang from the golang-backports ppa. RUN export DEBIAN_FRONTEND=noninteractive && \ export TZ=Etc/UTC && \ + export LC_ALL=C.UTF-8 && \ apt-add-repository "ppa:longsleep/golang-backports" && \ apt-get -qq update && \ apt-get -qqy install --no-install-recommends golang-go && \ From 9780c4d7fa9010a68a77d7bfdbba9dd43101b62f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 17 Oct 2023 09:03:46 -0500 Subject: [PATCH 3/7] try with sudo -E --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 11678d3ae3..5c4d215e0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ RUN export DEBIAN_FRONTEND=noninteractive && \ export TZ=Etc/UTC && \ export LC_ALL=C.UTF-8 && \ - apt-add-repository "ppa:longsleep/golang-backports" && \ + sudo -E apt-add-repository "ppa:longsleep/golang-backports" && \ apt-get -qq update && \ apt-get -qqy install --no-install-recommends golang-go && \ rm -rf /var/lib/apt/lists/* From 6f03c2216432d5b57bfa9ab932c4ae50749fb7d5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 17 Oct 2023 09:05:16 -0500 Subject: [PATCH 4/7] try updating certs --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5c4d215e0f..de942e5e66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ gpg \ apt-utils \ make && \ + sudo update-ca-certificates && \ rm -rf /var/lib/apt/lists/* # Install golang from the golang-backports ppa. From 5fec7bea6445a64df1619a65090076dd3512c85d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 17 Oct 2023 10:57:51 -0500 Subject: [PATCH 5/7] add pull request tag --- .evergreen/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index a54bb5e850..cfe2e6d858 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1684,6 +1684,7 @@ tasks: - func: run-atlas-data-lake-test - name: test-docker-runner + tags: ["pullrequest"] commands: - func: run-docker-test From d1380c198e6ab3109ba29a3fc932e891e92b0b60 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 18 Oct 2023 21:51:01 -0500 Subject: [PATCH 6/7] add note about drivers-tools --- docs/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 8a25e6f4d9..01b64d7bbc 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -134,7 +134,7 @@ There is currently no arm64 support for the go1.x runtime, see [here](https://do ### Testing in Docker -We support local testing in Docker. Ensure ``docker`` is installed and running, and then run: +We support local testing in Docker. To test using docker, you will need to set the `DRIVERS_TOOLs` environment variable to point to a local clone of the drivers-evergreen-tools repository. This is essential for running the testing matrix in a container. You can set the `DRIVERS_TOOLS` variable in your shell profile or in your project-specific environment. ```bash bash etc/run_docker.sh From 227674648c022ab811d7295188f8fb3d94608a60 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 1 Nov 2023 07:03:29 -0500 Subject: [PATCH 7/7] lint --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de942e5e66..c96c694b87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ make && \ sudo update-ca-certificates && \ rm -rf /var/lib/apt/lists/* - + # Install golang from the golang-backports ppa. RUN export DEBIAN_FRONTEND=noninteractive && \ export TZ=Etc/UTC && \