forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
140 lines (122 loc) · 3.4 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
FROM debian:sid
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update && apt-get -y install \
antlr4 \
automake \
autotools-dev \
bison \
build-essential \
checkinstall \
clang-13 \
clang-format-13 \
cmake \
curl \
dh-lua \
ed \
flex \
gawk \
git \
gnupg2 \
gobject-introspection \
icheck \
lcov \
libantlr4-runtime-dev \
libaugeas-dev \
libc6-dbg \
libdbus-1-dev \
libev-dev \
libgcrypt20-dev \
libgirepository1.0-dev \
libgit2-dev \
libglib2.0-dev \
libgpgme-dev \
liblua5.3-dev \
libpcre++-dev \
libpcre3-dev \
libpython3-dev \
libssl-dev \
libsystemd-dev \
libuv1-dev \
libxerces-c-dev \
libyajl-dev \
libyaml-cpp-dev \
libzmq3-dev \
llvm-13 \
moreutils \
ninja-build \
npm \
openjdk-11-jdk \
pkg-config \
python3-dev \
python3-pip \
ruby \
ruby-dev \
sloccount \
swig4.0 \
systemd \
tclcl-dev \
unzip \
valgrind \
wget \
&& rm -rf /var/lib/apt/lists/*
# Add Clang 13 to path
ENV PATH="/usr/lib/llvm-13/bin:$PATH"
# Update cache for shared libraries
RUN ldconfig
# Build dependency for libelektra-fuse
RUN pip3 install wheel
RUN pip3 install cmake-format[yaml]==0.6.13
# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=release-1.11.0
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
# Prettier
RUN npm install --global [email protected]
# Google Java formatter
RUN cd /opt \
&& curl -o google-java-format.jar \
-L https://github.com/google/google-java-format/releases/download/v1.11.0/google-java-format-1.11.0-all-deps.jar
# 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
# download and install gradle
RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.4-bin.zip && unzip gradle-7.4-bin.zip && rm gradle-7.4-bin.zip && mv gradle-7.4 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
USER ${JENKINS_USERID}
# shfmt
ENV SHFMT_PATH=/home/jenkins/bin
ENV SHFMT_VERSION=v3.3.1
ENV PATH="${SHFMT_PATH}:${PATH}"
RUN mkdir -p "${SHFMT_PATH}" \
&& cd "${SHFMT_PATH}" \
&& curl -L "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" -o shfmt \
&& chmod a+x shfmt
# Ronn-NG
ENV PATH="$PATH:/home/jenkins/.local/share/gem/ruby/3.0.0/bin"
RUN gem install --user-install ronn-ng -v 0.10.1.pre1 && ronn --version