forked from aergoio/aergo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.tools
20 lines (18 loc) · 904 Bytes
/
Dockerfile.tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:alpine as builder
RUN apk update && apk add git glide cmake build-base m4
ENV GOPATH $HOME/go
ARG GIT_TAG
RUN go get -d github.com/aergoio/aergo
WORKDIR ${GOPATH}/src/github.com/aergoio/aergo
RUN git checkout --detach ${GIT_TAG} && git submodule init && git submodule update && cmake .
RUN make aergocli aergoluac brick
FROM alpine:3.8
RUN apk add libgcc
COPY --from=builder $HOME/go/src/github.com/aergoio/aergo/bin/aergocli /usr/local/bin/
COPY --from=builder $HOME/go/src/github.com/aergoio/aergo/bin/aergoluac /usr/local/bin/
COPY --from=builder $HOME/go/src/github.com/aergoio/aergo/bin/brick /usr/local/bin/
COPY --from=builder $HOME/go/src/github.com/aergoio/aergo/cmd/brick/arglog.toml /tools/arglog.toml
COPY --from=builder $HOME/go/src/github.com/aergoio/aergo/libtool/lib/* /usr/local/lib/
ENV LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
WORKDIR /tools/
CMD ["aergocli"]