27 lines
967 B
Docker
27 lines
967 B
Docker
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
|
|
FROM docker.io/golang:1.17.5@sha256:90d1ab81f3d157ca649a9ff8d251691b810d95ea6023a03cdca139df58bca599
|
|
|
|
ARG WORMHOLE_VERSION=2.8.3
|
|
|
|
RUN apt-get update -qq && apt-get install -yq unzip
|
|
|
|
WORKDIR /app
|
|
ADD https://github.com/certusone/wormhole/archive/refs/tags/v${WORMHOLE_VERSION}.zip .
|
|
RUN unzip v${WORMHOLE_VERSION}.zip && rm -rf v${WORMHOLE_VERSION}.zip
|
|
|
|
ARG WORMHOLE_DIR=/app/wormhole-${WORMHOLE_VERSION}
|
|
|
|
WORKDIR $WORMHOLE_DIR/tools
|
|
RUN CGO_ENABLED=0 ./build.sh
|
|
|
|
WORKDIR $WORMHOLE_DIR
|
|
RUN tools/bin/buf lint && tools/bin/buf generate
|
|
|
|
WORKDIR ${WORMHOLE_DIR}/node/tools
|
|
RUN go build -mod=readonly -o /dlv github.com/go-delve/delve/cmd/dlv
|
|
|
|
WORKDIR ${WORMHOLE_DIR}/node
|
|
RUN go build -race -gcflags="all=-N -l" --ldflags '-extldflags "-Wl,--allow-multiple-definition"' -mod=readonly -o /guardiand github.com/certusone/wormhole/node
|
|
|
|
ENTRYPOINT /guardiand
|