forked from dettrace/dettrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (51 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
61 lines (51 loc) · 1.4 KB
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
57
58
59
60
61
# STAGE 1: Build the tool.
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && apt-get install -y \
clang++-6.0 \
clang-6.0 \
clang-format-6.0 \
clang-tidy-6.0 \
cpio \
fuse \
git \
less \
libacl1-dev \
libarchive-dev \
libbz2-dev \
libfuse-dev \
liblz4-dev \
liblzma-dev \
liblzo2-dev \
libseccomp-dev \
libssl-dev \
libxml2-dev \
lld-6.0 \
lldb-6.0 \
make \
nettle-dev \
openssh-server \
pkg-config \
python3 \
software-properties-common \
strace \
sudo \
valgrind
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 60 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 \
--slave /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-6.0 \
--slave /usr/bin/lldb lldb /usr/bin/lldb-6.0 \
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-6.0 \
--slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-6.0
WORKDIR /code
ADD ./ ./
ARG BUILDID=0
RUN make -j deb "BUILDID=${BUILDID}"
# STAGE 2:
# Copy only the deployment files into the final image:
FROM ubuntu:18.04
RUN apt-get update -y && apt-get install -y python3 bsdmainutils dnsutils curl
COPY --from=0 /code/*.deb /root/
RUN dpkg --install /root/*.deb
WORKDIR /usr/share/dettrace/examples
RUN echo 'export PS1="\w \[\033[1;36m\]$ \[\033[0m\]"' >> /root/.bashrc