Dockerfile add buildcache (#4332)

This commit is contained in:
Alex Sharov 2022-06-02 15:49:21 +07:00 committed by GitHub
parent 3ab2f07294
commit 4150c66eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1
# syntax = docker/dockerfile:1.2
FROM docker.io/library/golang:1.18-alpine3.15 AS builder
RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++
@ -6,7 +6,10 @@ RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc
WORKDIR /app
ADD . .
RUN make erigon rpcdaemon integration sentry txpool downloader hack observer db-tools
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/tmp/go-build \
--mount=type=cache,target=/go/pkg/mod \
make all db-tools
FROM docker.io/library/alpine:3.15

View File

@ -63,7 +63,6 @@ erigon: go-version erigon.cmd
COMMANDS += cons
COMMANDS += devnettest
COMMANDS += downloader
COMMANDS += evm
COMMANDS += hack
COMMANDS += integration
COMMANDS += observer