Skip to content

Commit

Permalink
GODRIVER-2989 Fix golang installation in Dockerfile (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Nov 1, 2023
1 parent b8004e6 commit 53450c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,7 @@ tasks:
- func: run-atlas-data-lake-test

- name: test-docker-runner
tags: ["pullrequest"]
commands:
- func: run-docker-test

Expand Down
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,26 @@ 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 && \
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 && \
export LC_ALL=C.UTF-8 && \
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/*
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,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
Expand Down

0 comments on commit 53450c7

Please sign in to comment.