diff --git a/build/Dockerfile b/build/Dockerfile index 3dce36b31c..1d84487db8 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -2,6 +2,11 @@ FROM golang:1.13.8 as build LABEL stage=build +# Create cache directory as user running the tests doesn't have the permissions to create it at runtime. This is required +# for the go builds below to succeed +RUN mkdir /go/.cache +ENV GOCACHE="/go/.cache" + # Build WMCB RUN mkdir /build/ WORKDIR /build/ diff --git a/build/Dockerfile.ci b/build/Dockerfile.ci index 2ec3dd96e1..3c2287c4bb 100644 --- a/build/Dockerfile.ci +++ b/build/Dockerfile.ci @@ -7,6 +7,11 @@ FROM golang:1.13.8 as build LABEL stage=build +# Create cache directory as user running the tests doesn't have the permissions to create it at runtime. This is required +# for the go builds below to succeed +RUN mkdir /go/.cache +ENV GOCACHE="/go/.cache" + # Build WMCB RUN mkdir /build/ WORKDIR /build/