问题
I'm use these how to install the FreeIPA with Docker (centos7) [https://hub.docker.com/r/freeipa/freeipa-server/ ] and I do not see any errors after these command:
`
docker run --name freeipa-server-container -ti -h ipa.labs.net -v /sys/fs/cgroup:/sys/fs/cgroup:ro --sysctl net.ipv6.conf.all.disable_ipv6=0 --cap-add=SYS_ADMIN --tmpfs /run --tmpfs /tmp -v /var/lib/ipa-data/ipa:/data:Z freeipa-server:centos7 exit-on-finished --no-ntp
.............
The ipa-client-install command was successful
ipa : ERROR unable to resolve host name ipa.labs.net. to IP address, ipa-ca DNS record will be incomplete
ipa : ERROR unable to resolve host name ipa.labs.net. to IP address, ipa-ca DNS record will be incomplete
Please add records in this file to your DNS system: /tmp/ipa.system.records.iad5Ct.db
==============================================================================
Setup complete
Next steps:
1. You must make sure these network ports are open:
TCP Ports:
* 80, 443: HTTP/HTTPS
* 389, 636: LDAP/LDAPS
* 88, 464: kerberos
UDP Ports:
* 88, 464: kerberos
2. You can now obtain a kerberos ticket using the command: 'kinit admin'
This ticket will allow you to use the IPA tools (e.g., ipa user-add)
and the web user interface.
3. Kerberos requires time synchronization between clients
and servers for correct operation. You should consider enabling ntpd.
Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password
FreeIPA server does not run DNS server, skipping update-self-ip-address.
Created symlink from /etc/systemd/system/container-ipa.target.wants/ipa-server-update-self-ip-address.service to /usr/lib/systemd/system/ipa-server-update-self-ip-address.service.
Created symlink from /etc/systemd/system/container-ipa.target.wants/ipa-server-upgrade.service to /usr/lib/systemd/system/ipa-server-upgrade.service.
Removed symlink /etc/systemd/system/container-ipa.target.wants/ipa-server-configure-first.service.
FreeIPA server configured.
[root@labdocker freeipa-container]#`
But when start the container didn't work:
`[root@labdocker freeipa-container]# docker start -ai freeipa-server-container
[root@labdocker freeipa-container]# docker container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7595dd26f073 freeipa-server:v0.2co "/usr/local/sbin/ini…" 43 minutes ago Up 20 seconds freeipa-server-container
[root@labdocker freeipa-container]# docker container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@labdocker freeipa-container]#`
I have no idea how to resolve this, please help me.
回答1:
Try to add
--sysctl net.ipv6.conf.lo.disable_ipv6=0
to your docker run command.
来源:https://stackoverflow.com/questions/52897205/startup-freeipa-with-docker-not-working-after-install