forked from Zokrates/ZoKrates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (34 loc) · 1.27 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
FROM ubuntu:18.04
MAINTAINER JacobEberhardt <jacob.eberhardt@tu-berlin.de>, Dennis Kuhnert <mail@kyroy.com>, Thibaut Schaeffer <thibaut@schaeff.fr>
RUN useradd -u 1000 -m zokrates
ARG RUST_TOOLCHAIN=nightly-2019-01-01
ARG LIBSNARK_COMMIT=f7c87b88744ecfd008126d415494d9b34c4c1b20
ENV LIBSNARK_SOURCE_PATH=/home/zokrates/libsnark-$LIBSNARK_COMMIT
ENV WITH_LIBSNARK=1
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
cmake \
curl \
libboost-dev \
libboost-program-options-dev \
libgmp3-dev \
libprocps-dev \
libssl-dev \
pkg-config \
python-markdown \
git \
&& rm -rf /var/lib/apt/lists/* \
&& git clone https://github.com/scipr-lab/libsnark.git $LIBSNARK_SOURCE_PATH \
&& git -C $LIBSNARK_SOURCE_PATH checkout $LIBSNARK_COMMIT \
&& git -C $LIBSNARK_SOURCE_PATH submodule update --init --recursive \
&& chown -R zokrates:zokrates $LIBSNARK_SOURCE_PATH
USER zokrates
WORKDIR /home/zokrates
COPY --chown=zokrates:zokrates . src
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_TOOLCHAIN -y \
&& export PATH=/home/zokrates/.cargo/bin:$PATH \
&& cd src \
&& ./build.sh \
&& rustup self uninstall -y \
&& rm -rf $LIBSNARK_SOURCE_PATH src