diff --git a/Dockerfile b/Dockerfile index b2f7a03..3dcaa7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,14 +8,15 @@ RUN apk add --no-cache openssh COPY _dev/.ssh /root/.ssh COPY _dev/.gitconfig /root/ -# Get and cache deps -COPY go.mod /plugeth-statediff/ -COPY go.sum /plugeth-statediff/ -RUN cd /plugeth-statediff && go mod download +WORKDIR /plugeth-statediff/ -ADD . /plugeth-statediff -RUN cd /plugeth-statediff && \ - go build --tags linkgeth --buildmode=plugin --trimpath -o statediff.so ./main +# Get and cache deps +COPY go.mod . +COPY go.sum . +RUN go mod download + +ADD . . +RUN go build --tags linkgeth --buildmode=plugin --trimpath -o statediff.so ./main FROM alpine:latest