Skip to content

Expose RuntimeContainer.Labels #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GLOCKFILE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/BurntSushi/toml f87ce853111478914f0bcffa34d43a93643e6eda
github.com/Sirupsen/logrus 6ebb4e7b3c24b9fef150d7693e728cb1ebadf1f5
github.com/docker/docker 95dcb2748442fc1f59e8c2e010679e0aea3cef1c
github.com/fsouza/go-dockerclient de7e7a55fa1ff99c88420e104e4966f9ad36c72d
github.com/fsouza/go-dockerclient 1e60afa8d58b91a0eca0a732927c8ecba696493f
1 change: 1 addition & 0 deletions docker-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type RuntimeContainer struct {
Env map[string]string
Volumes map[string]Volume
Node SwarmNode
Labels map[string]string
}

type DockerImage struct {
Expand Down
2 changes: 2 additions & 0 deletions docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func getContainers(client *docker.Client) ([]*RuntimeContainer, error) {
Env: make(map[string]string),
Volumes: make(map[string]Volume),
Node: SwarmNode{},
Labels: make(map[string]string),
}
for k, v := range container.NetworkSettings.Ports {
address := Address{
Expand Down Expand Up @@ -156,6 +157,7 @@ func getContainers(client *docker.Client) ([]*RuntimeContainer, error) {
}

runtimeContainer.Env = splitKeyValueSlice(container.Config.Env)
runtimeContainer.Labels = container.Config.Labels
containers = append(containers, runtimeContainer)
}
return containers, nil
Expand Down