dockerfile, .gitignore
This commit is contained in:
parent
8334985d24
commit
ccb517bf61
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
.git
|
||||
**/*_test.go
|
||||
*.so
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.so
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
# 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
|
||||
|
||||
# Get and cache deps
|
||||
COPY go.mod /plugeth-statediff/
|
||||
COPY go.sum /plugeth-statediff/
|
||||
RUN cd /plugeth-statediff && go mod download
|
||||
|
||||
ADD . /plugeth-statediff
|
||||
RUN cd /plugeth-statediff && \
|
||||
go build --tags linkgeth --buildmode=plugin --trimpath -o statediff.so ./main
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=builder /plugeth-statediff/statediff.so /usr/local/lib/
|
Loading…
Reference in New Issue
Block a user