dockerfile

This commit is contained in:
Jeff Lindsay 2014-07-01 21:58:28 -05:00
parent 1f78431fce
commit 0f4ef19e73
4 changed files with 16 additions and 8 deletions

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM progrium/busybox
MAINTAINER Jeff Lindsay <progrium@gmail.com
ADD ./stage/docksul /bin/docksul
ENTRYPOINT ["/bin/docksul"]

View File

@ -0,0 +1,5 @@
build:
mkdir -p stage
go build -o stage/docksul
docker build -t docksul .

View File

@ -130,14 +130,14 @@ func (b *ContainerServiceBridge) Unlink(containerId string) {
func main() {
flag.Parse()
dockerAddr := flag.Arg(0)
if dockerAddr == "" {
dockerAddr = "unix:///var/run/docker.sock"
}
consulAddr := flag.Arg(1)
consulAddr := flag.Arg(0)
if consulAddr == "" {
consulAddr = "http://0.0.0.0:8500"
}
dockerAddr := flag.Arg(1)
if dockerAddr == "" {
dockerAddr = "unix:///var/run/docker.sock"
}
client, err := docker.NewClient(dockerAddr)
assert(err)
@ -151,9 +151,6 @@ func main() {
}
events := make(chan *docker.APIEvents)
// TODO: resolve this workaround. https://github.com/fsouza/go-dockerclient/issues/101
assert(client.AddEventListener(events))
assert(client.RemoveEventListener(events))
assert(client.AddEventListener(events))
for msg := range events {
debug("event:", msg.ID[:12], msg.Status)

BIN
stage/docksul Executable file

Binary file not shown.