forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.Dockerfile
44 lines (36 loc) · 1.2 KB
/
package.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
FROM debian:buster
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get -y install strace \
&& rm -rf /var/lib/apt/lists/*
# 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
ENV ELEKTRA_ROOT=/opt/elektra/
RUN mkdir -p ${ELEKTRA_ROOT}
COPY ./*.deb ${ELEKTRA_ROOT}
COPY ./*.ddeb ${ELEKTRA_ROOT}
RUN apt-get update \
&& apt-get -y install ${ELEKTRA_ROOT}/* \
&& rm -rf /var/lib/apt/lists/*
RUN kdb mount-info \
&& mkdir -p `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` || true \
&& chown -R ${JENKINS_USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` \
&& chown -R ${JENKINS_USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SYSTEM .` \
&& chown -R ${JENKINS_USERID} `kdb sget system:/info/elektra/constants/cmake/BUILTIN_DATA_FOLDER .`
USER ${JENKINS_USERID}