-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
50 lines (41 loc) · 1.51 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
# Сборка базового образа для Debian 10.
FROM debian:10-slim as engine-base-debian-10
ADD docker/deb/libinfengine-common-perl_0.1.6-1_all.deb /deb/
ADD docker/deb/libinfengine-server-perl_0.2.3-1_all.deb /deb/
RUN apt-get update && \
apt-get upgrade -y \
gdebi \
cmake \
build-essential \
flex \
libgmp-dev \
libmemcached-dev \
libreadline-dev \
libicu-dev \
openssh-server \
rsyslog && \
gdebi /deb/libinfengine-common-perl_0.1.6-1_all.deb -n && \
gdebi /deb/libinfengine-server-perl_0.2.3-1_all.deb -n && \
apt-get clean && \
rm -rf *.deb \
/var/cache/apt/archives/* \
/var/lib/apt/lists/* && \
truncate /var/log/dpkg.log --size 0
# Сборка Компилятора DL.
FROM engine-base-debian-10 as engine-compiler-10
WORKDIR /src
ADD docker/config /engine
ADD . .
RUN ln -s /engine /usr/local/InfEngine && \
InfEngineManager.pl --build -j 5 --verbose && \
InfEngineManager.pl --install --trust --verbose && \
InfEngineManager.pl --dl-update /src/docker/dldata
# Сборка Диалогового Ядра.
FROM engine-base-debian-10 as engine-server
COPY --from=engine-compiler-10 /engine /engine
COPY --from=engine-compiler-10 /src/docker/start.sh /scripts/
ADD docker/syslog/rsyslog.conf /etc/rsyslog.conf
RUN ln -s /engine /usr/local/InfEngine && \
ln -sf /dev/stdout /var/log/syslog && \
echo "PermitUserEnvironment yes" >> /etc/ssh/sshd_config
CMD /scripts/start.sh || cat /usr/local/InfEngine/logs/InfEngine.log