plugeth-statediff/Dockerfile
Thomas E Lackey 0b9b571ec9
Some checks failed
Test / Run unit tests (pull_request) Failing after 46s
Test / Run integration tests (pull_request) Failing after 22s
Simplify slightly.
2023-07-06 15:32:26 -05:00

23 lines
632 B
Docker

# Using the same base golang image as geth
FROM golang:1.20-alpine as builder
RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git
# Configure creds for gitea
ARG GITEA_TOKEN
# Get and cache deps
WORKDIR /plugeth-statediff/
COPY go.mod .
COPY go.sum .
RUN if [ -n "$GITEA_TOKEN" ]; then git config --global url."https://$GITEA_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"; fi && \
go mod download && \
rm -f ~/.gitconfig
ADD . .
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/