forked from xrplevm/node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (29 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM golang:1.20 AS base
USER root
RUN apt update && \
apt-get install -y \
build-essential \
ca-certificates \
curl
RUN curl https://get.ignite.com/cli@v0.27.2! | bash
WORKDIR /go/src/github.com/Peersyst/exrp
COPY . .
FROM base AS build
ARG VERSION=0.0.0
RUN ignite chain build --release --release.prefix exrp_$VERSION -t linux:amd64 -v
RUN tar -xf /go/src/github.com/Peersyst/exrp/release/exrp_${VERSION}_linux_amd64.tar.gz -C /usr/bin
FROM base AS integration
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
RUN golangci-lint run
# Unit tests
RUN go test $(go list ./... | grep -v github.com/Peersyst/exrp/tests/e2e/poa)
# End to end tests
RUN TEST_CLEANUP_DIR=false go test -p 1 -v -timeout 30m ./tests/e2e/...
RUN touch /test.lock
FROM golang:1.20 AS release
WORKDIR /
COPY --from=integration /test.lock /test.lock
COPY --from=build /go/src/github.com/Peersyst/exrp/release /binaries
COPY --from=build /usr/bin/exrpd /usr/bin/exrpd
ENTRYPOINT ["/bin/sh", "-ec"]
CMD ["exrpd"]