Skip to content

Instantly share code, notes, and snippets.

@lancehudson
Last active February 18, 2016 03:01
Show Gist options
  • Save lancehudson/823848dec790bc1ca658 to your computer and use it in GitHub Desktop.
Save lancehudson/823848dec790bc1ca658 to your computer and use it in GitHub Desktop.
docker compose 2.0 options and extends not working
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 1.10.1
Storage Driver: overlay
Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: host bridge null
Kernel Version: 4.1.17-boot2docker
Operating System: Boot2Docker 1.10.1 (TCL 6.4.1); master : b03e158 - Thu Feb 11 22:34:01 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.821 GiB
Name: test
ID: M7CK:TPE5:CKL6:533Z:HD2V:XMDY:JVR2:FG4X:L2Y2:7MOO:GHKS:5HE4
Debug mode (server): true
File Descriptors: 16
Goroutines: 25
System Time: 2016-02-18T03:00:16.810462628Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
[
{
"Id": "eeae3639d1eda877b4438d4115d4fa6ad9990c39ee04252e9569b192a6a0e925",
"Created": "2016-02-18T02:59:43.84299656Z",
"Path": "/bin/sh",
"Args": [
"-c",
"php-fpm -d variables_order=\"EGPCS\" \u0026\u0026 (tail -F /var/log/nginx/access.log \u0026) \u0026\u0026 exec nginx -g \"daemon off;\""
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 3877,
"ExitCode": 0,
"Error": "",
"StartedAt": "2016-02-18T02:59:44.156832595Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:31e17b0746e48958b27f1d3dd4fe179fbba7e8efe14ad7a51e964181a92847a6",
"ResolvConfPath": "/mnt/sda1/var/lib/docker/containers/eeae3639d1eda877b4438d4115d4fa6ad9990c39ee04252e9569b192a6a0e925/resolv.conf",
"HostnamePath": "/mnt/sda1/var/lib/docker/containers/eeae3639d1eda877b4438d4115d4fa6ad9990c39ee04252e9569b192a6a0e925/hostname",
"HostsPath": "/mnt/sda1/var/lib/docker/containers/eeae3639d1eda877b4438d4115d4fa6ad9990c39ee04252e9569b192a6a0e925/hosts",
"LogPath": "/mnt/sda1/var/lib/docker/containers/eeae3639d1eda877b4438d4115d4fa6ad9990c39ee04252e9569b192a6a0e925/eeae3639d1eda877b4438d4115d4fa6ad9990c39ee04252e9569b192a6a0e925-json.log",
"Name": "/test_web-bridge_1",
"RestartCount": 0,
"Driver": "overlay",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "test_default",
"PortBindings": {
"80/tcp": [
{
"HostIp": "",
"HostPort": ""
}
]
},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"ShmSize": 67108864,
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"KernelMemory": 0,
"Memory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null
},
"GraphDriver": {
"Name": "overlay",
"Data": {
"LowerDir": "/mnt/sda1/var/lib/docker/overlay/bd5246a581624ff51eb1af263bb65a458cfe9b6db4558b777307777ac7746b55/root",
"MergedDir": "/mnt/sda1/var/lib/docker/overlay/fe656b969160e6873f9a3818f7e6b650acc356b400250bd8b429e8accb30114c/merged",
"UpperDir": "/mnt/sda1/var/lib/docker/overlay/fe656b969160e6873f9a3818f7e6b650acc356b400250bd8b429e8accb30114c/upper",
"WorkDir": "/mnt/sda1/var/lib/docker/overlay/fe656b969160e6873f9a3818f7e6b650acc356b400250bd8b429e8accb30114c/work"
}
},
"Mounts": [],
"Config": {
"Hostname": "web",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh",
"-c",
"php-fpm -d variables_order=\"EGPCS\" \u0026\u0026 (tail -F /var/log/nginx/access.log \u0026) \u0026\u0026 exec nginx -g \"daemon off;\""
],
"Image": "tutum/hello-world",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "af42fcf73847ab32b52cd97b0f0cc4784cc6d464ea10c677a449866cbdbab6a7",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "test",
"com.docker.compose.service": "web-bridge",
"com.docker.compose.version": "1.6.0"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "7a4ca0bb221fdca41a2c6eb6121cb4c6359a03754042a0a24b6f7725287f73a8",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "32777"
}
]
},
"SandboxKey": "/var/run/docker/netns/7a4ca0bb221f",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"test_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"web-bridge",
"eeae3639d1"
],
"NetworkID": "1179d127e8831b8afa27f82b804474a17e7ac1afb53f2fd50a7423e42fee13e0",
"EndpointID": "c5689c011b00562c9eb57981735c3e61ec7d08abf175774b16eb92133269b195",
"Gateway": "172.18.0.1",
"IPAddress": "172.18.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:12:00:02"
}
}
}
}
]
[
{
"Id": "5856c7c8648a0b7294c58e9f723ad4735329cf482905dc18b7b4112a262b5934",
"Created": "2016-02-18T02:52:31.971417365Z",
"Path": "/bin/sh",
"Args": [
"-c",
"php-fpm -d variables_order=\"EGPCS\" \u0026\u0026 (tail -F /var/log/nginx/access.log \u0026) \u0026\u0026 exec nginx -g \"daemon off;\""
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 3671,
"ExitCode": 0,
"Error": "",
"StartedAt": "2016-02-18T02:52:32.32938907Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:31e17b0746e48958b27f1d3dd4fe179fbba7e8efe14ad7a51e964181a92847a6",
"ResolvConfPath": "/mnt/sda1/var/lib/docker/containers/5856c7c8648a0b7294c58e9f723ad4735329cf482905dc18b7b4112a262b5934/resolv.conf",
"HostnamePath": "/mnt/sda1/var/lib/docker/containers/5856c7c8648a0b7294c58e9f723ad4735329cf482905dc18b7b4112a262b5934/hostname",
"HostsPath": "/mnt/sda1/var/lib/docker/containers/5856c7c8648a0b7294c58e9f723ad4735329cf482905dc18b7b4112a262b5934/hosts",
"LogPath": "/mnt/sda1/var/lib/docker/containers/5856c7c8648a0b7294c58e9f723ad4735329cf482905dc18b7b4112a262b5934/5856c7c8648a0b7294c58e9f723ad4735329cf482905dc18b7b4112a262b5934-json.log",
"Name": "/test_web-net2_1",
"RestartCount": 0,
"Driver": "overlay",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "test_default",
"PortBindings": {
"80/tcp": [
{
"HostIp": "",
"HostPort": ""
}
]
},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"ShmSize": 67108864,
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"KernelMemory": 0,
"Memory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null
},
"GraphDriver": {
"Name": "overlay",
"Data": {
"LowerDir": "/mnt/sda1/var/lib/docker/overlay/bd5246a581624ff51eb1af263bb65a458cfe9b6db4558b777307777ac7746b55/root",
"MergedDir": "/mnt/sda1/var/lib/docker/overlay/8a37f113fdd40749862ddc96c5adf37a6911e740ea094b4acfd3a7aa02843416/merged",
"UpperDir": "/mnt/sda1/var/lib/docker/overlay/8a37f113fdd40749862ddc96c5adf37a6911e740ea094b4acfd3a7aa02843416/upper",
"WorkDir": "/mnt/sda1/var/lib/docker/overlay/8a37f113fdd40749862ddc96c5adf37a6911e740ea094b4acfd3a7aa02843416/work"
}
},
"Mounts": [],
"Config": {
"Hostname": "web",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh",
"-c",
"php-fpm -d variables_order=\"EGPCS\" \u0026\u0026 (tail -F /var/log/nginx/access.log \u0026) \u0026\u0026 exec nginx -g \"daemon off;\""
],
"Image": "tutum/hello-world",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "af42fcf73847ab32b52cd97b0f0cc4784cc6d464ea10c677a449866cbdbab6a7",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "test",
"com.docker.compose.service": "web-net2",
"com.docker.compose.version": "1.6.0"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "54b04070d5ca17cbcf7bcdf9c97fef3567416e6398515fdf8de46426f9398618",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "32775"
}
]
},
"SandboxKey": "/var/run/docker/netns/54b04070d5ca",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"test_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"web-net2",
"5856c7c864"
],
"NetworkID": "8d92d7d3ab6f93541ef6b867f553421c7540dc25da47fbeefbff20cf17f6d5a7",
"EndpointID": "23e21d5207968d3962cc22c2cef5d053fff3ebd45e16c14132e24f2163343ee5",
"Gateway": "172.18.0.1",
"IPAddress": "172.18.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:12:00:03"
}
}
}
}
]
networks: {}
services:
web:
hostname: web
image: tutum/hello-world
network_mode: bridge
ports:
- 80
web-bridge:
hostname: web
image: tutum/hello-world
ports:
- 80
version: '2.0'
volumes: {}
networks:
default:
driver: bridge
net2:
driver: bridge
services:
web:
hostname: web
image: tutum/hello-world
networks:
- default
ports:
- 80
web-net2:
hostname: web
image: tutum/hello-world
ports:
- 80
version: '2.0'
volumes: {}
WARNING: Some networks were defined but are not used by any service: net2
Creating network "test_default" with driver "bridge"
Creating test_web_1
Creating test_web-net2_1
Attaching to test_web_1, test_web-net2_1
docker-compose version 1.6.0, build unknown
docker-py version: 1.7.0
CPython version: 2.7.10
OpenSSL version: OpenSSL 0.9.8zg 14 July 2015
version: "2"
services:
web:
image: tutum/hello-world
hostname: web
ports:
- 80
network_mode: bridge
web-bridge:
extends:
service: web
network_mode: bridge
version: "2"
services:
web:
image: tutum/hello-world
hostname: web
ports:
- 80
networks:
- default
web-net2:
extends:
service: web
networks:
- net2
networks:
default:
driver: bridge
net2:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment