forked from Zokrates/ZoKrates
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add production dockerfile, update CI
- Loading branch information
Showing
4 changed files
with
85 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Exit if any subcommand fails | ||
set -e | ||
|
||
if [ -n "$WITH_LIBSNARK" ]; then | ||
cargo build --release | ||
else | ||
cargo -Z package-features build --release --no-default-features | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM ubuntu:14.04 | ||
|
||
MAINTAINER JacobEberhardt <jacob.eberhardt@tu-berlin.de>, Dennis Kuhnert <mail@kyroy.com> | ||
|
||
RUN useradd -u 1000 -m zokrates | ||
|
||
ARG RUST_TOOLCHAIN=nightly-2018-06-04 | ||
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 \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
libboost-all-dev \ | ||
libgmp3-dev \ | ||
libprocps3-dev \ | ||
libssl-dev \ | ||
pkg-config \ | ||
python-markdown \ | ||
git | ||
|
||
USER zokrates | ||
|
||
RUN curl https://sh.rustup.rs -sSf | \ | ||
sh -s -- --default-toolchain $RUST_TOOLCHAIN -y | ||
|
||
ENV PATH=/home/zokrates/.cargo/bin:$PATH | ||
|
||
RUN git clone https://github.com/scipr-lab/libsnark.git $LIBSNARK_SOURCE_PATH | ||
|
||
WORKDIR $LIBSNARK_SOURCE_PATH | ||
|
||
RUN git checkout $LIBSNARK_COMMIT | ||
RUN git submodule update --init --recursive | ||
|
||
WORKDIR /home/zokrates | ||
|
||
COPY --chown=zokrates:zokrates . ZoKrates | ||
|
||
RUN cd ZoKrates \ | ||
&& ./build.sh |