plugeth-statediff/Dockerfile
Roy Crihfield c9ade8e13d
Some checks failed
Test / Run integration tests (pull_request) Failing after 6m17s
Test / Run compliance tests (pull_request) Failing after 1m32s
Test / Run unit tests (pull_request) Failing after 11m26s
bump go in dockerfile
2024-03-18 22:41:10 +08:00

23 lines
719 B
Docker

# Using image with same alpine as plugeth,
# but go 1.21 to evade https://github.com/Consensys/gnark-crypto/issues/468
FROM golang:1.21-alpine3.18 as builder
RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git
# Configure creds for gitea
ARG GIT_VDBTO_TOKEN
# Get and cache deps
WORKDIR /plugeth-statediff/
COPY go.mod go.sum ./
RUN if [ -n "$GIT_VDBTO_TOKEN" ]; then git config --global url."https://$GIT_VDBTO_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"; fi && \
go mod download && \
rm -f ~/.gitconfig
COPY . .
RUN go build --tags linkgeth --buildmode=plugin --trimpath -o statediff.so ./main
FROM alpine:3.18
COPY --from=builder /plugeth-statediff/statediff.so /usr/local/lib/