forked from Zokrates/ZoKrates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (29 loc) · 1.17 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
FROM ubuntu:18.04
#MAINTAINER JacobEberhardt <jacob.eberhardt@tu-berlin.de>, Thibaut Schaeffer <thibaut@schaeff.fr>
RUN useradd -u 1000 -m zokrates
ARG RUST_TOOLCHAIN=nightly-2019-06-02
ENV WITH_LIBSNARK=1
ENV ZOKRATES_HOME=/home/zokrates/.zokrates
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY ./scripts/install_libsnark_prerequisites.sh /tmp/
RUN /tmp/install_libsnark_prerequisites.sh
USER zokrates
WORKDIR /home/zokrates
COPY --chown=zokrates:zokrates . src
COPY --chown=zokrates:zokrates ./entrypoint.sh /home/zokrates/entrypoint.sh
RUN chmod +x /home/zokrates/entrypoint.sh
RUN mkdir /home/zokrates/output
RUN mkdir /home/zokrates/zok_code
RUN mkdir $ZOKRATES_HOME
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_TOOLCHAIN -y \
&& export PATH=/home/zokrates/.cargo/bin:$PATH \
&& (cd src;./build_release.sh) \
&& mv ./src/target/release/zokrates . \
&& mv ./src/zokrates_cli/examples . \
&& mv ./src/zokrates_stdlib/stdlib/* $ZOKRATES_HOME \
&& rustup self uninstall -y \
&& rm -rf src
ENTRYPOINT [ "/home/zokrates/entrypoint.sh" ]