harbor/make/photon/log/Dockerfile
Daniel Jiang 3d09089a9c Rebuild Harbor images based on photon:2.0 (#6054)
Make necessary change to make things work with photon 2.0 docker image.
Remove distro-sync to mitigate the build issue and add `--pull` to docker build
command to make sure the latest photon:2.0 will be pulled during build process.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2018-10-18 11:03:28 +08:00

27 lines
771 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 && \
chown -R 10000:10000 /etc/rsyslog.conf /etc/rsyslog.d/ /run
HEALTHCHECK CMD netstat -ltu|grep 10514
VOLUME /var/log/docker/ /run/ /etc/logrotate.d/
EXPOSE 10514
CMD /usr/local/bin/start.sh