2019-11-12 04:20:54 +01:00
|
|
|
ARG harbor_base_image_version
|
2020-04-01 13:46:45 +02:00
|
|
|
ARG harbor_base_namespace
|
|
|
|
FROM ${harbor_base_namespace}/harbor-log-base:${harbor_base_image_version}
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/log/rsyslog.conf /etc/rsyslog.conf
|
2016-08-23 11:57:12 +02:00
|
|
|
|
|
|
|
# rsyslog configuration file for docker
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/log/rsyslog_docker.conf /etc/rsyslog.d/
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2019-02-19 06:18:45 +01:00
|
|
|
# remove the original "logrotate" in directory "/etc/cron.daily/"
|
|
|
|
# and copy the customized one to directory "/etc/cron.hourly/"
|
|
|
|
# to run logrotate hourly
|
|
|
|
RUN rm /etc/cron.daily/logrotate
|
|
|
|
COPY ./make/photon/log/logrotate /etc/cron.hourly/
|
2017-11-08 06:07:27 +01:00
|
|
|
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/log/start.sh /usr/local/bin/
|
2018-10-22 05:34:27 +02:00
|
|
|
RUN chmod +x /usr/local/bin/start.sh /etc/rsyslog.d/ && \
|
2019-02-19 06:18:45 +01:00
|
|
|
chown -R 10000:10000 /etc/rsyslog.conf /etc/rsyslog.d/ /run /var/lib/logrotate/
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2018-12-27 08:39:19 +01:00
|
|
|
HEALTHCHECK CMD netstat -ltun|grep 10514
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2017-11-08 06:07:27 +01:00
|
|
|
VOLUME /var/log/docker/ /run/ /etc/logrotate.d/
|
2017-11-02 04:51:32 +01:00
|
|
|
|
|
|
|
CMD /usr/local/bin/start.sh
|