2017-11-06 06:52:23 +01:00
|
|
|
FROM vmware/photon:1.0
|
|
|
|
|
2017-12-20 06:10:32 +01:00
|
|
|
RUN tdnf distro-sync -y \
|
2018-02-27 08:01:14 +01:00
|
|
|
&& tdnf install -y cronie rsyslog logrotate shadow tar gzip sudo net-tools >> /dev/null\
|
2017-11-06 06:52:23 +01:00
|
|
|
&& mkdir /etc/rsyslog.d/ \
|
|
|
|
&& mkdir /var/spool/rsyslog \
|
|
|
|
&& groupadd -r -g 10000 syslog && useradd --no-log-init -r -g 10000 -u 10000 syslog \
|
|
|
|
&& tdnf clean all
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2017-11-02 04:51:32 +01:00
|
|
|
COPY rsyslog.conf /etc/rsyslog.conf
|
2016-08-23 11:57:12 +02:00
|
|
|
|
|
|
|
# rsyslog configuration file for docker
|
2017-11-02 04:51:32 +01:00
|
|
|
COPY rsyslog_docker.conf /etc/rsyslog.d/
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2017-11-08 06:07:27 +01:00
|
|
|
# run logrotate hourly
|
|
|
|
RUN mv /etc/cron.daily/logrotate /etc/cron.hourly/logrotate
|
|
|
|
|
2017-11-02 04:51:32 +01:00
|
|
|
COPY start.sh /usr/local/bin/
|
|
|
|
RUN chmod +x /usr/local/bin/start.sh && \
|
2017-11-13 11:04:17 +01:00
|
|
|
chown -R 10000:10000 /etc/rsyslog.conf /etc/rsyslog.d/ /run
|
2016-08-23 11:57:12 +02:00
|
|
|
|
2017-11-02 04:51:32 +01:00
|
|
|
HEALTHCHECK CMD netstat -ltu|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
|
|
|
|
|
|
|
EXPOSE 10514
|
|
|
|
|
|
|
|
CMD /usr/local/bin/start.sh
|