mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-21 16:19:21 +01:00
27 lines
657 B
Docker
27 lines
657 B
Docker
FROM library/photon:latest
|
|
|
|
# run logrotate hourly, disable imklog model, provides TCP/UDP syslog reception
|
|
RUN tdnf install -y cronie rsyslog logrotate shadow\
|
|
&& mv /etc/cron.daily/logrotate /etc/cron.hourly/ \
|
|
&& mkdir /etc/rsyslog.d/ \
|
|
&& mkdir /var/spool/rsyslog \
|
|
&& groupadd syslog \
|
|
&& useradd -g syslog syslog
|
|
|
|
ADD rsyslog.conf /etc/rsyslog.conf
|
|
|
|
COPY logrotate.conf.photon /etc/logrotate.conf
|
|
|
|
# logrotate configuration file for docker
|
|
ADD logrotate_docker.conf /etc/logrotate.d/
|
|
|
|
# rsyslog configuration file for docker
|
|
ADD rsyslog_docker.conf /etc/rsyslog.d/
|
|
|
|
|
|
VOLUME /var/log/docker/
|
|
|
|
EXPOSE 514
|
|
|
|
CMD crond && rsyslogd -n
|