forked from ChainSafe/forest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-ci
27 lines (22 loc) · 987 Bytes
/
Dockerfile-ci
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
# This Dockerfile is used for consistent build environment in CI
# Example usage:
# docker build -t forest/rust:latest -f ./Dockerfile-ci .
# docker run forest/rust cargo c
FROM rust:1.42-stretch
WORKDIR /usr/src/forest
COPY . .
# Install protoc
ENV PROTOC_ZIP protoc-3.7.1-linux-x86_64.zip
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/$PROTOC_ZIP
RUN unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
RUN unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
RUN rm -f $PROTOC_ZIP
# Extra dependencies needed for rust-fil-proofs
RUN apt-get update && \
apt-get install -y curl file gcc g++ git make openssh-client \
autoconf automake cmake libtool libcurl4-openssl-dev libssl-dev \
libelf-dev libdw-dev binutils-dev zlib1g-dev libiberty-dev wget \
xz-utils pkg-config python clang ocl-icd-opencl-dev
RUN bash -l -c 'echo $(rustc --print sysroot)/lib >> /etc/ld.so.conf'
RUN bash -l -c 'echo /usr/local/lib >> /etc/ld.so.conf'
RUN ldconfig