-
Notifications
You must be signed in to change notification settings - Fork 678
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allowing easy custom builds of logspout
- Loading branch information
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM gliderlabs/logspout:master | ||
ENV SYSLOG_FORMAT rfc3164 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Custom Logspout Builds | ||
|
||
Forking logspout to change modules is unnecessary! Instead, you can create an | ||
empty Dockerfile based on logspout and include a new `modules.go` file for the | ||
build context that will override the standard one. | ||
|
||
This directory is an example of doing this. It pairs logspout down to just the | ||
syslog adapter and TCP transport. Note this means you can only create routes | ||
with `syslog+tcp` as the adapter. | ||
|
||
It also shows you can take this opportunity to change default configuration by | ||
setting environment in the Dockefile. Here we change the syslog adapter format | ||
from the default of `rfc5424` to old school `rfc3164`. | ||
|
||
Now you just have to `docker build` with this Dockerfile and you'll get a custom | ||
logspout container image. No need to install Go, no need to maintain a fork. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package main | ||
|
||
import ( | ||
_ "github.com/gliderlabs/logspout/adapters/syslog" | ||
_ "github.com/gliderlabs/logspout/transports/tcp" | ||
) |