forked from renproject/multichain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (44 loc) · 1.47 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
43
44
45
46
47
48
49
50
FROM golang
# doing all updates and installs in a single step and removing the apt cache helps reduce the image size
RUN apt-get update && \
apt-get install -y \
mesa-opencl-icd \
ocl-icd-opencl-dev \
libssl-dev \
libudev-dev \
hwloc \
libhwloc-dev \
gcc \
git \
bzr \
jq \
pkg-config \
curl \
wget && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*
ENV GO111MODULE=on
ENV GOPROXY=https://proxy.golang.org
ARG GITHUB_TOKEN
RUN git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
ENV GOPRIVATE="github.com/renproject/ren-solana,github.com/renproject/solana-ffi"
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN mkdir -p $(go env GOPATH)
WORKDIR $GOPATH
RUN mkdir -p src/github.com/filecoin-project
WORKDIR $GOPATH/src/github.com/filecoin-project
RUN git clone https://github.com/filecoin-project/filecoin-ffi
WORKDIR $GOPATH/src/github.com/filecoin-project/filecoin-ffi
RUN git checkout 7912389334e347bbb2eac0520c836830875c39de
RUN make
RUN go install
WORKDIR $GOPATH
RUN go install github.com/xlab/c-for-go@master
RUN mkdir -p src/github.com/renproject
WORKDIR $GOPATH/src/github.com/renproject
RUN git clone https://github.com/renproject/solana-ffi
WORKDIR $GOPATH/src/github.com/renproject/solana-ffi
RUN git checkout 720c0143d8655bfcd412ae73c949474df2c1dcf3
RUN make clean && make
RUN go install ./...