compose: Compose unable to attach to an interactive service.
Running docker-compose up
hangs with the following docker-compose.yaml
:
version: '2'
services:
sandy:
image: ubuntu:15.10
stdin_open: true
tty: true
The output produced is…
Creating dockersandbox_sandy_1
Attaching to dockersandbox_sandy_1
ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.
The docker VM is already started and running the suggested command doesn’t fix the problem. I have also tried following the instructions detailed in the update for issue #2180 but it doesn’t appear to resolve the issue.
However, the container seems to have been created and started since it does appear in the output of docker ps
. Attaching to the newly created container with docker attach {id}
also appears to be working fine.
Here is the output of docker info
in case the information is useful:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 1.10.1
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 4
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
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: 1
Total Memory: 1.956 GiB
Name: default
ID: YXX3:TYOD:BAJH:ARCD:DI6A:YI4I:JLMO:DO2L:DHIY:E7BQ:YGVZ:AAOY
Debug mode (server): true
File Descriptors: 10
Goroutines: 22
System Time: 2016-02-18T05:26:52.911868214Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
docker -v
yields Docker version 1.10.1, build 9e83765
.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 21 (3 by maintainers)
Confirmed that this is still an issue on macOS with Docker Desktop.
I’m also still experiencing this issue. As previously mentioned, the problem occurs when using
docker-compose up
, but everything works fine usingdocker-compose run name-of-service
. Bothstdin_open: true
andtty: true
are defined in the specification of the service in mydocker-compose.yml
file. The YAML file isversion: '3'
, if that makes any difference.