diff --git a/Dockerfile-localnet b/Dockerfile-localnet index 65ca4188b4..ba86debb86 100644 --- a/Dockerfile-localnet +++ b/Dockerfile-localnet @@ -3,6 +3,7 @@ FROM golang:1.20-alpine3.18 ENV GOPATH /go ENV GOOS=linux ENV CGO_ENABLED=1 +ENV GOCACHE=/root/.cache/go-build RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux python3 py3-pip RUN pip install requests @@ -14,8 +15,8 @@ COPY go.sum . RUN go mod download COPY . . -RUN make install -RUN make install-zetae2e +RUN --mount=type=cache,target="/root/.cache/go-build" make install +RUN --mount=type=cache,target="/root/.cache/go-build" make install-zetae2e RUN ssh-keygen -A WORKDIR /root diff --git a/Makefile b/Makefile index b8a6d7415f..2cc2bf1d80 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ TEST_DIR?="./..." TEST_BUILD_FLAGS := -tags pebbledb,ledger HSM_BUILD_FLAGS := -tags pebbledb,ledger,hsm_test +export DOCKER_BUILDKIT := 1 + clean: clean-binaries clean-dir clean-test-dir clean-coverage clean-binaries: