Public | Automated Build

Last pushed: 2 years ago
Short Description
An image used to transfer all contents of files within a directory to a central loghost provider
Full Description

Logtransfer image definition

This image was created to transfer the contents of all files within a specified (and therefore mounted) folder to papertrail.


To create a container based upon this image you will need to define several parameters within the docker run command. They are:

Parameter Description (possible) Values/Forma mandatory
-d Detaches the container (as you don't want to see all of the containers output) - y
--log-driver Defines the log-driver to use to send logs to syslog y
--log-opt For this image that parameter has only one purpose: define the log destination syslog-address:[udp or tcp]://[papertrail-hostname]:[destination-port] y
-v defines the folder to mount into the containers working directory (/opt/logs) -v PATH_TO_LOCAL_LOGS_FOLDER:/opt/logs y
-h defines the containers hostname any valid hostname-string (like: cron-log) n
--name defines the container name for docker ps listing same as -h n

Running the image

Example run command:

docker run -d --log-driver syslog --log-opt syslog-address:udp:// -v $(pwd):/opt/logs bestitdocker/logtransfer

Or including optional parameters:

docker run -d --log-driver syslog --log-opt syslog-address:udp:// -v $(pwd):/opt/logs -h i-am-a-log-transfer-container --name i-am-a-log-transfer-container bestitdocker/logtransfer
Docker Pull Command
Source Repository