mirror of
https://github.com/valitydev/registrator.git
synced 2024-11-06 10:55:19 +00:00
dockerfile
This commit is contained in:
parent
1f78431fce
commit
0f4ef19e73
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM progrium/busybox
|
||||
MAINTAINER Jeff Lindsay <progrium@gmail.com
|
||||
|
||||
ADD ./stage/docksul /bin/docksul
|
||||
|
||||
ENTRYPOINT ["/bin/docksul"]
|
5
Makefile
5
Makefile
@ -0,0 +1,5 @@
|
||||
|
||||
build:
|
||||
mkdir -p stage
|
||||
go build -o stage/docksul
|
||||
docker build -t docksul .
|
13
docksul.go
13
docksul.go
@ -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
BIN
stage/docksul
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user