-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (30 loc) · 1.27 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
FROM ubuntu:18.04
# Set the default shell to bash
#SHELL ["/bin/bash", "-c"]
# Fake sudo script
# This is needed to be compatible with the dandelion.sh script
# and not need to install sudo (we are root in the container)
# It runs all arguments as a normal command
RUN echo '#!/usr/bin/env bash\n"$@"' > /usr/bin/sudo && chmod +x /usr/bin/sudo
#RUN apt-get update && \
#apt-get upgrade -y && \
#apt-get install -y git
COPY repos/ /repos
# Run dandelion-generator install script
WORKDIR /repos/uir
# Send four y's as input to dandelion script to install everything
RUN printf 'y\ny\ny\ny\n' | ./scripts/dandelion.sh
# Publish dandelion-lib locally
WORKDIR /repos/uir-lib
RUN sbt 'publishLocal'
# Make and test dandelion-generator
WORKDIR /repos/dandelion-generator/dependencies/Tapir-Meta
# When sourcing setup-env.sh the shell cwd must be the directory of the script because it uses $(pwd)
RUN . ./setup-env.sh && cd ../.. && mkdir build && cd build && cmake -DLLVM_DIR=/repos/uir/dependencies/Tapir-Meta/tapir/build/lib/cmake/llvm/ -DTAPIR=ON .. && make
# Adding clang and dandelion to PATH
ENV PATH="/repos/uir/dependencies/Tapir-Meta/tapir/build/bin:${PATH}"
ENV PATH="/repos/uir/build/bin:${PATH}"
WORKDIR /repos/uir/
RUN cd build \
&& cd tests/c \
&& make all