-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.kdc
58 lines (51 loc) · 1.86 KB
/
Dockerfile.kdc
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
FROM opensuse/leap:15.6 AS ref_repo
RUN zypper --non-interactive mr -e -a &&\
zypper --non-interactive --gpg-auto-import-keys ref --force && \
zypper --non-interactive in git-core vim tcpdump iputils iproute2 libopenssl-3-devel openldap2-devel \
flex bison autoconf gettext-tools libtool make gcc awk gcc-c++ python3 strace gdb
RUN pushd /root/ && git clone https://github.com/krb5/krb5.git && popd
COPY kdc_test/*.patch /root/krb5
RUN pushd /root/krb5 && git apply *.patch && popd
ENV CFLAGS="-O0 -g -DDEBUG -D_GNU_SOURCE -fPIC"
ENV SS_LIB="-lss"
RUN pushd /root/krb5/src && autoreconf -fi && ./configure \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var/lib/kerberos \
--sharedstatedir=/var/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localedir=/usr/share/locale \
--without-system-et \
--without-system-verto \
--without-system-ss \
--with-crypto-impl=openssl \
--without-lmdb \
--with-ldap \
--with-pam \
--without-selinux \
--disable-rpath \
--disable-static \
--enable-shared \
--enable-dns-for-realm \
--enable-pkinit \
&& make && make install && popd && ldconfig
RUN ln -s /usr/lib64/krb5/plugins/kdb/db2.so /usr/lib64/krb5/plugins/kdb/db2
RUN ln -s /usr/lib64/krb5/plugins/kdb/kldap.so /usr/lib64/krb5/plugins/kdb/kldap
COPY kdc_test/kadm5.acl /var/lib/kerberos/krb5kdc/kadm5.acl
COPY kdc_test/kadm5.dict /var/lib/kerberos/krb5kdc/kadm5.dict
COPY kdc_test/kdc.conf /var/lib/kerberos/krb5kdc/kdc.conf
COPY kdc_test/krb5.conf /etc/krb5.conf
COPY kdc_test/provision.sh /tmp/provision.sh
RUN id
RUN /tmp/provision.sh
EXPOSE 88/tcp
EXPOSE 88/udp
CMD ["/usr/sbin/krb5kdc", "-n"]