forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
71 lines (63 loc) · 1.79 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM ubuntu:disco
RUN apt-get update && apt-get -y install \
antlr4 \
bison \
build-essential \
clang-8 \
cmake \
curl \
ed \
git \
libantlr4-runtime-dev \
libyajl-dev \
libyaml-cpp-dev \
llvm \
locales \
moreutils \
ninja-build \
perl \
pkg-config \
python3-dev \
ruby-dev \
valgrind \
&& rm -rf /var/lib/apt/lists/*
# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=release-1.8.1
RUN mkdir -p ${GTEST_ROOT} \
&& cd /tmp \
&& curl -o gtest.tar.gz \
-L https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz \
&& tar -zxvf gtest.tar.gz --strip-components=1 -C ${GTEST_ROOT} \
&& rm gtest.tar.gz
# Update cache for shared libraries
RUN ldconfig
# hyperfine
ARG HYPERFINE_VERSION=1.5.0
RUN cd /tmp \
&& curl -o hyperfine.deb \
-L https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/hyperfine_${HYPERFINE_VERSION}_amd64.deb \
&& dpkg -i hyperfine.deb \
&& rm hyperfine.deb
# Create User:Group
# The id is important as jenkins docker agents use the same id that is running
# on the slaves to execute containers
ARG JENKINS_GROUPID
RUN groupadd \
-g ${JENKINS_GROUPID} \
-f \
jenkins
ARG JENKINS_USERID
RUN useradd \
--create-home \
--uid ${JENKINS_USERID} \
--gid ${JENKINS_GROUPID} \
--shell "/bin/bash" \
jenkins
USER ${JENKINS_USERID}
# flamegraph.pl
ARG FLAME_GRAPH_PATH=/home/jenkins/bin
ENV PATH="${FLAME_GRAPH_PATH}:${PATH}"
RUN mkdir -p "${FLAME_GRAPH_PATH}" \
&& curl -L "https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl" -o "${FLAME_GRAPH_PATH}/flamegraph" \
&& chmod a+x "${FLAME_GRAPH_PATH}/flamegraph"