-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 1.15 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
FROM centos
# MIT License
# Ideas from https://github.com/jtgasper3/docker-images/blob/master/389-ds/Dockerfile
RUN curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\
&& rpm -Uvh epel-release-latest-7.noarch.rpm\
&& rm -f epel-release-latest-7.noarch.rpm
RUN yum update -y\
&& yum install -y\
389-ds-base\
openssl\
&& yum clean all
# Basicaly
# * turn off selinux
# * disable hostname check (most important, as this is absolutely unreliable in a container)
# * disable restart of Services, makes no sense during container build
# * disable reloading of systemd setting. also makes no sense during container build
RUN cd /usr/lib64/dirsrv/perl\
&& sed -i.orig 's/checkHostname {/checkHostname {\nreturn();/g' DSUtil.pm \
&& sed -i.orig 's/updateSelinuxPolicy($inf);//g' DSCreate.pm DSUpdate.pm \
&& sed -i.orig 's/DSCreate::updateSelinuxPolicy($inf);//g' DSMigration.pm \
&& sed -i.orig2 '/if (@errs = startServer($inf))/,/}/d' DSCreate.pm \
&& sed -i.orig3 's:/bin/systemctl --system daemon-reload:/bin/echo /bin/systemctl --system daemon-reload:g' DSCreate.pm
ADD install/cnt/ /cnt/
CMD [ "/cnt/init.sh" ]
EXPOSE 389 636