mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-08 11:41:54 +01:00
a8d0ab1a21
I guess that the purpose of this check is to verify that the container is listening on port 10514. Healthcheck default timeout is 30 sec. In places where the DNS resolver is not working properly, this check could take more than 30 sec, which leads to decide that the container health is unhealthy. I advise you to add to your check the option n, which prevents netstat trying to determine the symbolic host. Signed-off-by: overdogwatch <overdogwatch@gmail.com>
27 lines
788 B
Docker
27 lines
788 B
Docker
FROM photon:2.0
|
|
|
|
RUN tdnf install -y cronie rsyslog logrotate shadow tar gzip sudo >> /dev/null\
|
|
&& mkdir /var/spool/rsyslog \
|
|
&& groupadd -r -g 10000 syslog && useradd --no-log-init -r -g 10000 -u 10000 syslog \
|
|
&& tdnf clean all
|
|
|
|
COPY ./make/photon/log/rsyslog.conf /etc/rsyslog.conf
|
|
|
|
# rsyslog configuration file for docker
|
|
COPY ./make/photon/log/rsyslog_docker.conf /etc/rsyslog.d/
|
|
|
|
# run logrotate hourly
|
|
RUN mv /etc/cron.daily/logrotate /etc/cron.hourly/logrotate
|
|
|
|
COPY ./make/photon/log/start.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/start.sh /etc/rsyslog.d/ && \
|
|
chown -R 10000:10000 /etc/rsyslog.conf /etc/rsyslog.d/ /run
|
|
|
|
HEALTHCHECK CMD netstat -ltun|grep 10514
|
|
|
|
VOLUME /var/log/docker/ /run/ /etc/logrotate.d/
|
|
|
|
EXPOSE 10514
|
|
|
|
CMD /usr/local/bin/start.sh
|