siemonster :: verbose found container id
This commit is contained in:
@@ -112,10 +112,11 @@ func deployWorker(image string, identifier string, env []string) {
|
|||||||
|
|
||||||
// form container id and use it as network source if it's not empty
|
// form container id and use it as network source if it's not empty
|
||||||
containerId := getThisContainerId()
|
containerId := getThisContainerId()
|
||||||
|
log.Printf("Found self container id: %s", containerId)
|
||||||
if containerId != "" {
|
if containerId != "" {
|
||||||
hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId))
|
hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId))
|
||||||
} else {
|
} else {
|
||||||
log.Printf("[WARNING] Empty determined container id, continue without NetworkMode")
|
log.Printf("[WARNING] Empty self container id, continue without NetworkMode")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ROFL: https://docker-py.readthedocs.io/en/1.4.0/volumes/
|
// ROFL: https://docker-py.readthedocs.io/en/1.4.0/volumes/
|
||||||
|
|||||||
@@ -436,10 +436,11 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
|||||||
|
|
||||||
// form container id and use it as network source if it's not empty
|
// form container id and use it as network source if it's not empty
|
||||||
containerId := getThisContainerId()
|
containerId := getThisContainerId()
|
||||||
|
log.Printf("Found self container id: %s", containerId)
|
||||||
if containerId != "" {
|
if containerId != "" {
|
||||||
hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId))
|
hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId))
|
||||||
} else {
|
} else {
|
||||||
log.Printf("[WARNING] Empty determined container id, continue without NetworkMode")
|
log.Printf("[WARNING] Empty self container id, continue without NetworkMode")
|
||||||
}
|
}
|
||||||
|
|
||||||
config := &container.Config{
|
config := &container.Config{
|
||||||
|
|||||||
Reference in New Issue
Block a user