aboutsummaryrefslogtreecommitdiffstats
path: root/tools/docker
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-01-23 11:26:43 +0100
committerTaras Madan <tarasmadan@google.com>2025-01-23 10:40:56 +0000
commit475a4c203afb8b7d3af51c4fd32bb170ff32a45e (patch)
treecacb3f58844ac42d7b16a96a053c460c4a2765f6 /tools/docker
parent9d4f14f879d34d715f61d84f4b1144e9fa8ca236 (diff)
tools/docker/syz-env: persist GOMODCACHE
Prevent Go from downloading all external dependencies each time syz-env is called. It will become a problem once vendor/ is deleted.
Diffstat (limited to 'tools/docker')
-rw-r--r--tools/docker/env/Dockerfile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/docker/env/Dockerfile b/tools/docker/env/Dockerfile
index e97c46562..552a3e453 100644
--- a/tools/docker/env/Dockerfile
+++ b/tools/docker/env/Dockerfile
@@ -25,7 +25,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q curl
# otherwise --volume will create these dirs under root and then
# the current user won't have access to them.
RUN mkdir -p /syzkaller/gopath/src/github.com/google/syzkaller && \
- mkdir -p /syzkaller/.cache && \
+ mkdir -p /syzkaller/.cache/gomod && \
chmod -R 0777 /syzkaller
# Install OS toolchains from pre-built archives.
@@ -83,6 +83,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends
RUN curl https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz | tar -C /usr/local -xz
ENV PATH /usr/local/go/bin:/gopath/bin:$PATH
ENV GOPATH /gopath
+ENV GOMODCACHE /syzkaller/.cache/gomod
# Install clang.
RUN apt-get install -y -q gnupg software-properties-common apt-transport-https