moby: Error Getting a list of running containers
Output of docker version
:
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: f1e1b83
Built:
OS/Arch: linux/amd64
Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: f1e1b83
Built:
OS/Arch: linux/amd64
Output of docker info
:
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 2
Server Version: 1.12.1
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge overlay null host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: selinux
Kernel Version: 4.7.1-coreos
Operating System: CoreOS 1151.0.0 (MoreOS)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 7.801 GiB
Name: core-01
ID: 3D66:DYWJ:CZIL:ESFB:CW3S:UTSG:VFZY:YBLT:E234:H7L2:OIOT:Y7ZL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: easywebdeploy
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Additional environment details (AWS, VirtualBox, physical, etc.): Running CoreOS Alpha 1151.0.0 On Vagrant 1.8.5 Ubuntu 16.04
Steps to reproduce the issue:
- Run a simple container and make sure its running
- Run “curl -v --unix-socket /var/run/docker.sock http:/containers/json” to get a list of Containers
Describe the results you received:
* Trying /var/run/docker.sock...
* Connected to containers (/var/run/docker.sock) port 80 (#0)
> GET /json HTTP/1.1
> Host: containers
> User-Agent: curl/7.50.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: application/json
< Date: Mon, 29 Aug 2016 08:48:02 GMT
< Content-Length: 29
<
{"message":"page not found"}
* Connection #0 to host containers left intact
Describe the results you expected: Expected is the JSON list of all running containers
Additional information you deem important (e.g. issue happens only occasionally): Was working correctly on CoreOS with Docker version till 1.11.2
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- Update docker_remote_api.md See https://github.com/docker/docker/issues/26099#issuecomment-245007539 Signed-off-by: Gerwim Feiken <g.feiken@tfe.nl> — committed to thaJeztah/docker by gerwim 8 years ago
- Update docker_remote_api.md See https://github.com/docker/docker/issues/26099#issuecomment-245007539 Signed-off-by: Gerwim Feiken <g.feiken@tfe.nl> (cherry picked from commit 587b186f85383f98f5475b8... — committed to thaJeztah/docker by gerwim 8 years ago
This url is wrong, the correct url is
/containers/json
. The issue is how curl is interpreting the url.I had to use:
curl -v --unix-socket /var/run/docker.sock http://localhost/containers/json
to get it to work (on alpine:3.4). If this command is documented somewhere in the docker documentation, please link it here, and we will make sure to correct the documentation.Closing this issue since there is nothing to be done in docker/docker.