Created
December 20, 2019 19:51
-
-
Save sudheerchamarthi/975432a6b75d4e5ce17449e81082642e to your computer and use it in GitHub Desktop.
RsyslogdDockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu | |
| RUN apt update && apt install rsyslog -y | |
| RUN echo '$ModLoad imudp \n\ | |
| $UDPServerRun 514 \n\ | |
| $ModLoad imtcp \n\ | |
| $InputTCPServerRun 514 \n\ | |
| $template RemoteStore, "/var/log/remote/%$year%/%$Month%/%$Day%/%$Hour%.log" \n\ | |
| :source, !isequal, "localhost" -?RemoteStore \n\ | |
| :source, isequal, "last" ~ ' > /etc/rsyslog.conf | |
| ENTRYPOINT ["rsyslogd", "-n"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment