-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (40 loc) · 1.1 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
44
45
46
47
FROM ubuntu:18.04 as builder
# Install APT dependencies required for building chimera.
RUN apt-get update -qq \
&& apt-get install -y -qq \
cmake \
clang \
clang-format \
llvm-6.0-dev \
llvm-6.0-tools \
libboost-dev \
libclang-6.0-dev \
libedit-dev \
libyaml-cpp-dev \
libz-dev \
&& rm -rf /var/lib/apt/lists/*
# Compile and install chimera
COPY . /opt/chimera
WORKDIR /opt/chimera
RUN mkdir build && cd build \
&& cmake -DBUILD_TESTING=off .. \
&& make install
#############################################################################
FROM ubuntu:18.04
# Install APT dependencies required for running chimera.
RUN apt-get update -qq \
&& apt-get install -y -qq \
llvm-6.0-tools \
libclang-6.0 \
libedit2 \
libyaml-cpp0.5v5 \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
# Install Chimera from the build image.
COPY --from=builder /usr/local/bin/chimera /usr/local/bin/chimera
# Create a non-root user to run Chimera application
RUN useradd --create-home -s /bin/bash user
WORKDIR /home/user
USER user
# Set chimera as the default entrypoint.
ENTRYPOINT ["/usr/local/bin/chimera"]