dockerfile cleanup

This commit is contained in:
Roy Crihfield 2023-07-01 19:14:49 +08:00
parent 5e8f283897
commit 95797252ed

View File

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