plugeth-statediff/Dockerfile
Thomas E Lackey a1729e1add
Some checks failed
Test / Run unit tests (pull_request) Failing after 49s
Test / Run integration tests (pull_request) Failing after 3m8s
Use new CI/CD access token for build. (#5)
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Reviewed-on: #5
Co-authored-by: Thomas E Lackey <telackey@noreply.git.vdb.to>
Co-committed-by: Thomas E Lackey <telackey@noreply.git.vdb.to>
2023-07-10 22:40:12 +00:00

22 lines
638 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 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/