forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.Dockerfile
45 lines (35 loc) · 1.28 KB
/
release.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
# syntax = docker/dockerfile:1.2
FROM debian:buster
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
ARG USERID=1000
RUN adduser elektra --uid ${USERID} \
&& adduser elektra sudo
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 \
sudo \
vim \
&& apt-get -y install ${ELEKTRA_ROOT}/* \
&& rm -rf /var/lib/apt/lists/*
RUN rm -rf ${ELEKTRA_ROOT}
RUN kdb mount-info \
&& mkdir -p `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` || true \
&& chown -R ${USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` \
&& chown -R ${USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SYSTEM .` \
&& chown -R ${USERID} `kdb sget system:/info/elektra/constants/cmake/BUILTIN_DATA_FOLDER .`
RUN --mount=type=tmpfs,target=/tmp \
--mount=type=tmpfs,target=/etc/kdb \
--mount=type=tmpfs,target=/root/.cache/elektra \
--mount=type=tmpfs,target=/root/.config \
export $(dbus-launch); \
systemd-machine-id-setup || true # xfconf also requires a machine-id; \
kdb run_all
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER ${USERID}
WORKDIR /home/elektra
CMD ["/bin/bash","-l"]