Skip to content

Commit 53450c7

Browse files
authored
GODRIVER-2989 Fix golang installation in Dockerfile (#1430)
1 parent b8004e6 commit 53450c7

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.evergreen/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,7 @@ tasks:
15201520
- func: run-atlas-data-lake-test
15211521

15221522
- name: test-docker-runner
1523+
tags: ["pullrequest"]
15231524
commands:
15241525
- func: run-docker-test
15251526

Dockerfile

+13-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,26 @@ RUN cd /root && bash ./install-libmongocrypt.sh
2020
# from the libmongocrypt build stage.
2121
FROM drivers-evergreen-tools
2222

23+
# Install common deps.
2324
RUN export DEBIAN_FRONTEND=noninteractive && \
2425
export TZ=Etc/UTC && \
2526
apt-get -qq update && \
26-
apt-get -qqy install --no-install-recommends \
27-
pkg-config \
27+
apt-get -qqy install --reinstall --no-install-recommends \
2828
tzdata \
29+
ca-certificates \
30+
pkg-config \
31+
software-properties-common \
2932
gpg \
3033
apt-utils \
3134
make && \
32-
apt-add-repository ppa:longsleep/golang-backports && \
35+
sudo update-ca-certificates && \
36+
rm -rf /var/lib/apt/lists/*
37+
38+
# Install golang from the golang-backports ppa.
39+
RUN export DEBIAN_FRONTEND=noninteractive && \
40+
export TZ=Etc/UTC && \
41+
export LC_ALL=C.UTF-8 && \
42+
sudo -E apt-add-repository "ppa:longsleep/golang-backports" && \
3343
apt-get -qq update && \
3444
apt-get -qqy install --no-install-recommends golang-go && \
3545
rm -rf /var/lib/apt/lists/*

docs/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ There is currently no arm64 support for the go1.x runtime, see [here](https://do
154154

155155
### Testing in Docker
156156

157-
We support local testing in Docker. Ensure `docker` is installed and running, and then run:
157+
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.
158158

159159
```bash
160160
bash etc/run_docker.sh

0 commit comments

Comments
 (0)