diff --git a/hack/dockerfiles/fuzz.Dockerfile b/hack/dockerfiles/fuzz.Dockerfile index 422da15b5962..84747587b0c0 100644 --- a/hack/dockerfiles/fuzz.Dockerfile +++ b/hack/dockerfiles/fuzz.Dockerfile @@ -1,17 +1,16 @@ -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get upgrade -y -RUN apt-get install wget git software-properties-common build-essential -y -RUN wget https://golang.org/dl/go1.14.9.linux-amd64.tar.gz -RUN tar -xvf go1.14.9.linux-amd64.tar.gz -RUN mv go /usr/local +FROM golang:1.15-alpine +ENV DEBIAN_FRONTEND=noninteractive RUN mkdir /root/src ENV GOPATH /root/go ENV GOROOT /usr/local/go ENV PATH $PATH:/usr/local/go/bin -RUN go get github.com/moby/buildkit -RUN go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build +RUN apk add --no-cache git mercurial \ + && go get -u github.com/dvyukov/go-fuzz/go-fuzz \ + github.com/dvyukov/go-fuzz/go-fuzz-build \ + github.com/moby/buildkit \ + && apk del git mercurial COPY fuzz.go /go/src/github.com/moby/buildkit/frontend/dockerfiles/parser/ -RUN cd /go/src/github.com/moby/buildkit/frontend/dockerfiles/parser && $GOPATH/bin/go-fuzz-build && $GOPATH/bin/go-fuzz +RUN cd /go/src/github.com/moby/buildkit/frontend/dockerfiles/parser \ + && $GOPATH/bin/go-fuzz-build && $GOPATH/bin/go-fuzz