mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 11:46:43 +01:00
Update Dockerfile
This commit is contained in:
parent
17637fae2e
commit
9bfb566f5e
@ -1,23 +1,19 @@
|
|||||||
FROM library/ubuntu:14.04
|
FROM library/ubuntu:14.04
|
||||||
|
|
||||||
# run logrotate hourly
|
|
||||||
RUN mv /etc/cron.daily/logrotate /etc/cron.hourly/
|
# run logrotate hourly, disable imklog model, provides TCP/UDP syslog reception
|
||||||
|
RUN mv /etc/cron.daily/logrotate /etc/cron.hourly/ \
|
||||||
|
&& sed 's/$ModLoad imklog/#$ModLoad imklog/' -i /etc/rsyslog.conf \
|
||||||
|
&& sed 's/$KLogPermitNonKernelFacility on/#$KLogPermitNonKernelFacility on/' -i /etc/rsyslog.conf \
|
||||||
|
&& sed 's/#$ModLoad imudp/$ModLoad imudp/' -i /etc/rsyslog.conf \
|
||||||
|
&& sed 's/#$UDPServerRun 514/$UDPServerRun 514/' -i /etc/rsyslog.conf \
|
||||||
|
&& sed 's/#$ModLoad imtcp/$ModLoad imtcp/' -i /etc/rsyslog.conf \
|
||||||
|
&& sed 's/#$InputTCPServerRun 514/$InputTCPServerRun 514/' -i /etc/rsyslog.conf \
|
||||||
|
&& rm /etc/rsyslog.d/*
|
||||||
|
|
||||||
# logrotate configuration file for docker
|
# logrotate configuration file for docker
|
||||||
ADD logrotate_docker.conf /etc/logrotate.d/
|
ADD logrotate_docker.conf /etc/logrotate.d/
|
||||||
|
|
||||||
#disable imklog model
|
|
||||||
RUN sed 's/$ModLoad imklog/#$ModLoad imklog/' -i /etc/rsyslog.conf
|
|
||||||
RUN sed 's/$KLogPermitNonKernelFacility on/#$KLogPermitNonKernelFacility on/' -i /etc/rsyslog.conf
|
|
||||||
|
|
||||||
# provides TCP/UDP syslog reception
|
|
||||||
RUN sed 's/#$ModLoad imudp/$ModLoad imudp/' -i /etc/rsyslog.conf
|
|
||||||
RUN sed 's/#$UDPServerRun 514/$UDPServerRun 514/' -i /etc/rsyslog.conf
|
|
||||||
RUN sed 's/#$ModLoad imtcp/$ModLoad imtcp/' -i /etc/rsyslog.conf
|
|
||||||
RUN sed 's/#$InputTCPServerRun 514/$InputTCPServerRun 514/' -i /etc/rsyslog.conf
|
|
||||||
|
|
||||||
RUN rm /etc/rsyslog.d/*
|
|
||||||
|
|
||||||
# rsyslog configuration file for docker
|
# rsyslog configuration file for docker
|
||||||
ADD rsyslog_docker.conf /etc/rsyslog.d/
|
ADD rsyslog_docker.conf /etc/rsyslog.d/
|
||||||
|
|
||||||
@ -26,3 +22,4 @@ VOLUME /var/log/docker/
|
|||||||
EXPOSE 514
|
EXPOSE 514
|
||||||
|
|
||||||
CMD cron && chown -R syslog:syslog /var/log/docker/ && rsyslogd -n
|
CMD cron && chown -R syslog:syslog /var/log/docker/ && rsyslogd -n
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user