-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.earth
56 lines (48 loc) · 1.56 KB
/
build.earth
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
45
46
47
48
49
50
51
52
53
54
55
56
FROM ubuntu:20.04
WORKDIR /build
solc:
WORKDIR /solc-build
RUN apt-get update && apt-get install -y \
software-properties-common
RUN add-apt-repository ppa:ethereum/ethereum
RUN apt-get update && apt-get install -y solc
COPY src/contracts/ .
RUN for solfile in *.sol; \
do \
solc --combined-json bin,metadata ${solfile} \
> "${solfile%.*}.combined.json"; \
done
SAVE ARTIFACT *.combined.json /deployed_contracts/ AS LOCAL ./src/contracts_data/
docker:
ENV METEMCYBER_HOST_ADDR=0.0.0.0
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y \
software-properties-common
RUN add-apt-repository ppa:ethereum/ethereum
RUN apt-get update && apt-get install -y \
solc \
python3.8 \
python3-pip \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
COPY requirements.txt ./
COPY requirements/ ./requirements/
RUN pip install --no-cache-dir -r requirements.txt
SAVE IMAGE metemcyber-python:latest
docs:
WORKDIR /sphinx-build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
python3.8 \
python3-pip \
graphviz \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
COPY requirements/ ./requirements/
RUN pip install --no-cache-dir -r requirements/docs.txt
COPY docs/ ./docs/
WORKDIR docs
RUN make html
SAVE ARTIFACT ./_build/html/ /html/ AS LOCAL ./docs/_build/html/