Skip to content

Commit

Permalink
custom: Update README and include example build script
Browse files Browse the repository at this point in the history
  • Loading branch information
jmreicha committed Aug 25, 2016
1 parent 1195f07 commit 007e026
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Custom Logspout Builds

Forking logspout to change modules is unnecessary! Instead, you can create an
empty Dockerfile based on `gliderlabs/logspout:master` and include a new `modules.go` file for the
build context that will override the standard one.
empty Dockerfile based on `gliderlabs/logspout:master` and include a new
`modules.go` file as well as the `build.sh` script that resides in the root of
this repo 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
Expand Down
15 changes: 15 additions & 0 deletions custom/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
set -e
apk add --update go git mercurial build-base
mkdir -p /go/src/github.com/gliderlabs
cp -r /src /go/src/github.com/gliderlabs/logspout
cd /go/src/github.com/gliderlabs/logspout
export GOPATH=/go
go get
go build -ldflags "-X main.Version $1" -o /bin/logspout
apk del go git mercurial build-base
rm -rf /go
rm -rf /var/cache/apk/*

# backwards compatibility
ln -fs /tmp/docker.sock /var/run/docker.sock

0 comments on commit 007e026

Please sign in to comment.