-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
43 lines (36 loc) · 993 Bytes
/
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
FROM node:13 as builder
ADD ./frontend /frontend
WORKDIR /frontend
RUN npm install && npm run build
FROM ubuntu:18.04
# Deps
RUN apt-get update
RUN apt-get install -y z3 libz3-dev ghc cabal-install python-pip python-virtualenv
RUN cabal update
RUN pip install ipaddr parsec==3.5 textx==1.8.0 Flask
# Haskell libs
COPY ./lib/z3-haskell /FWSlib/z3-haskell
WORKDIR /FWSlib/z3-haskell
RUN cabal install --global
COPY ./lib/HaPy-haskell /FWSlib/HaPy-haskell
WORKDIR /FWSlib/HaPy-haskell
RUN cabal install --global
COPY ./FireWallSynthesizer.cabal /FWS/
WORKDIR /FWS
RUN cabal install --global --dependencies-only
# Python libs
COPY ./lib/HaPy-python /FWSlib/HaPy-python
WORKDIR /FWSlib/HaPy-python
RUN python setup.py install
# FWS Build
COPY . /FWS
WORKDIR /FWS
RUN ./update_libs.sh
RUN cabal install --global
# Copy frontend data
COPY --from=builder /frontend/dist /FWS/fwsynthesizer/web/static
# Install python fws
RUN python setup.py install
# Entrypoint
WORKDIR /mnt
ENTRYPOINT ["fws"]