Skip to content

Commit

Permalink
tools/docker/syz-env: persist GOMODCACHE
Browse files Browse the repository at this point in the history
Prevent Go from downloading all external dependencies each time syz-env
is called. It will become a problem once vendor/ is deleted.
  • Loading branch information
a-nogikh authored and tarasmadan committed Jan 23, 2025
1 parent 9d4f14f commit 475a4c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/docker/env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 475a4c2

Please sign in to comment.