forked from irisnet/irishub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (33 loc) · 1.02 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
35
36
37
38
39
40
41
42
# Simple usage with a mounted data directory:
# > docker build -t irishub .
# > docker run -v $HOME/.iris:/root/.iris iris init
# > docker run -v $HOME/.iris:/root/.iris iris start
FROM golang:1.10-alpine3.7 as builder
# Set up dependencies
ENV PACKAGES make gcc git libc-dev bash
# Set up GOPATH & PATH
ENV GOPATH /root/go
ENV BASE_PATH $GOPATH/src/github.com/irisnet
ENV REPO_PATH $BASE_PATH/irishub
ENV PATH $GOPATH/bin:$PATH
# Add source files
COPY . $REPO_PATH/
# Install minimum necessary dependencies, build Cosmos SDK, remove packages
RUN cd $REPO_PATH && \
apk add --no-cache $PACKAGES && \
go get github.com/golang/dep/cmd/dep && \
make get_tools && \
make get_vendor_deps && \
make test_unit && \
make build_linux && \
make install && \
make install_examples && \
make test_cli && \
make test_lcd && \
make test_sim
FROM alpine:3.7
# p2p port
EXPOSE 26656
# rpc port
EXPOSE 26657
COPY --from=builder /root/go/src/github.com/irisnet/irishub/build/ /usr/local/bin/