Browse Source

Adding dockerfile for chainspace

Jim Barritt 11 months ago
parent
commit
4f615c7f8a

+ 49 - 0
apps/petitions/decode-app/ops/artifact/chainspace/Dockerfile

@@ -0,0 +1,49 @@
1
+  FROM alpine:3.6
2
+
3
+    ARG zenroom_tag=bfa60a9e48b781c09fd9b4fe4bfef865bc127075
4
+
5
+    WORKDIR /code/zenroom
6
+
7
+    RUN apk update
8
+    RUN apk upgrade
9
+    RUN apk add --no-cache git openssh git
10
+
11
+    RUN git clone \
12
+    https://github.com/DECODEproject/zenroom.git \
13
+    . \
14
+    && git checkout ${zenroom_tag} \
15
+    && git submodule init \
16
+    && git submodule update
17
+
18
+    RUN apk add --no-cache make cmake gcc musl-dev musl musl-utils
19
+    RUN make musl-system
20
+
21
+    FROM ubuntu:16.04
22
+
23
+    RUN apt-get update && \
24
+    apt-get install -y openjdk-8-jdk && \
25
+    apt-get install -y ant screen virtualenv python python-setuptools wget gzip \
26
+    build-essential libssl-dev libffi-dev python-dev maven && \
27
+    apt-get clean && \
28
+    rm -rf /var/lib/apt/lists/*;
29
+
30
+
31
+    COPY chainspaceapi /app/chainspaceapi
32
+    COPY chainspacecontract /app/chainspacecontract
33
+    COPY chainspacecore /app/chainspacecore
34
+    COPY contrib /app/contrib
35
+    COPY Makefile /app/
36
+
37
+    COPY --from=0 /code/zenroom/src/zenroom-static /usr/bin/zenroom
38
+    COPY --from=0 /code/zenroom/examples/elgamal  /opt/contracts/
39
+
40
+    RUN easy_install pip
41
+    WORKDIR /app
42
+    RUN virtualenv .chainspace.env
43
+    RUN . .chainspace.env/bin/activate && pip install -U setuptools
44
+    RUN . .chainspace.env/bin/activate && pip install -e ./chainspaceapi
45
+    RUN . .chainspace.env/bin/activate && pip install -e ./chainspacecontract
46
+    RUN . .chainspace.env/bin/activate && pip install petlib
47
+    RUN . .chainspace.env/bin/activate && make build-jar
48
+
49
+    CMD make start-nodes && make start-client-api

apps/petitions/decode-app/ops/artifact/Dockerfile → apps/petitions/decode-app/ops/artifact/decode-app/Dockerfile