mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
The client part deployment fails in the configuration of NIS. The command /usr/bin/nisdomainname is failing in a container in this task as the container is not privileged. The hostnamectl-wrapper is copied from the freeipa-container container project to replace /usr/bin/nisdomainname in the container.
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
FROM quay.io/centos/centos:stream10-development
|
|
ENV container=podman
|
|
|
|
RUN rm -fv /var/cache/dnf/metadata_lock.pid; \
|
|
dnf makecache; \
|
|
dnf --assumeyes install \
|
|
/usr/bin/dnf-3 \
|
|
sudo \
|
|
bash \
|
|
systemd \
|
|
procps-ng \
|
|
iproute \
|
|
hostname; \
|
|
rm -rf /var/cache/dnf/;
|
|
|
|
# Prepare for basic ipa-server-install in container
|
|
# Address failing nis-domainname.service in the ipa-client-install step
|
|
RUN mv /usr/bin/nisdomainname /usr/bin/nisdomainname.orig
|
|
ADD utils/hostnamectl-wrapper /usr/bin/nisdomainname
|
|
RUN chmod a+rx /usr/bin/nisdomainname
|
|
|
|
RUN (cd /lib/systemd/system/; \
|
|
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
|
|
ln -s dbus-broker.service dbus.service; \
|
|
fi \
|
|
)
|
|
COPY system-service/container-ipa.target /lib/systemd/system/
|
|
RUN systemctl set-default container-ipa.target
|
|
RUN (cd /etc/systemd/system/; \
|
|
rm -rf multi-user.target.wants \
|
|
&& mkdir container-ipa.target.wants \
|
|
&& ln -s container-ipa.target.wants multi-user.target.wants \
|
|
)
|
|
|
|
COPY system-service/fixnet.sh /root/
|
|
COPY system-service/fixipaip.sh /root/
|
|
COPY system-service/fixnet.service /etc/systemd/system/
|
|
COPY system-service/fixipaip.service /etc/systemd/system/
|
|
RUN chmod +x /root/fixnet.sh /root/fixipaip.sh
|
|
|
|
STOPSIGNAL RTMIN+3
|
|
|
|
VOLUME ["/sys/fs/cgroup"]
|
|
|
|
CMD ["/usr/sbin/init"]
|