Skip to content

Commit 475a4c2

Browse files
a-nogikhtarasmadan
authored andcommitted
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.
1 parent 9d4f14f commit 475a4c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/docker/env/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q curl
2525
# otherwise --volume will create these dirs under root and then
2626
# the current user won't have access to them.
2727
RUN mkdir -p /syzkaller/gopath/src/github.com/google/syzkaller && \
28-
mkdir -p /syzkaller/.cache && \
28+
mkdir -p /syzkaller/.cache/gomod && \
2929
chmod -R 0777 /syzkaller
3030

3131
# Install OS toolchains from pre-built archives.
@@ -83,6 +83,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends
8383
RUN curl https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz | tar -C /usr/local -xz
8484
ENV PATH /usr/local/go/bin:/gopath/bin:$PATH
8585
ENV GOPATH /gopath
86+
ENV GOMODCACHE /syzkaller/.cache/gomod
8687

8788
# Install clang.
8889
RUN apt-get install -y -q gnupg software-properties-common apt-transport-https

0 commit comments

Comments
 (0)