Commit graph

3197 commits

Author SHA1 Message Date
Guillaume J. Charmes
0eeb146398 Merge pull request #4270 from DevTable/fixregistryauth
Fix registry auth and remove other hidden ping commands from client code
2014-03-03 17:34:21 -08:00
Victor Vieux
37d0ce42c6 Merge pull request #4385 from khia/json_format
Support json output in --format flag of docker inspect
2014-03-03 12:36:47 -08:00
Brandon Philips
8d2226b7e5 fix(api): serve until the "acceptconnections" job
This fixes a bug that I encountered when using socket activation with
docker 0.8.1. When running the first `docker run` it would return:
"create: command not found".

The root cause was the socket activation code path was starting to
listen before the "initserver" job had finished. This meant that the
"create" handler hand't been registered yet leading to the command not
found error.

In log format it looks like this:

```
[/var/lib/docker|9d2e78e9] +job initserver()
2014/03/01 04:05:35 Listening for HTTP on fd ()
[/var/lib/docker|0d71c177] +job create()
create: command not found
[/var/lib/docker|0d71c177] -job create()
[/var/lib/docker|0d71c177] +job acceptconnections()
[/var/lib/docker|0d71c177] -job initserver() = OK (0)
```

To fix the issue select on the activationLock and block until the
"acceptconnections" job has ran.

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
2014-03-01 10:55:36 -08:00
ILYA Khlopotov
e07920f680 Support json output in --format flag of docker inspect
Docker-DCO-1.1-Signed-off-by: ILYA Khlopotov <ilya.khlopotov@gmail.com> (github: khia)
2014-02-28 17:34:31 -08:00
Brian Goff
d78fcb32ff Add ability to force removal of running container via docker rm -f
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-02-27 23:31:36 -05:00
unclejack
bde192bb80 Merge pull request #4078 from vieux/rewrite_rmi
Rewrite docker rmi
2014-02-26 21:30:24 +02:00
unclejack
31ddc16692 Merge pull request #4292 from cpuguy83/4291_make_rm_default_for_build
make docker build -rm=true default
2014-02-26 19:03:59 +02:00
Brian Goff
0b4aeb79d9 make docker build -rm=true default #4292
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-02-26 11:04:06 -05:00
unclejack
b8a8c0c686 Merge pull request #4342 from vieux/update_maintainers_api
update api Maintainers file
2014-02-26 16:33:02 +02:00
Victor Vieux
2f468a498a update api Maintainers file
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 23:19:44 +00:00
Victor Vieux
386e7c80c0 fix content-type docker copy
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 22:49:19 +00:00
Victor Vieux
8dad771daa add version pkg
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 21:08:38 +00:00
Victor Vieux
964d82d005 fix tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 21:08:08 +00:00
Victor Vieux
c7f825c0f0 := / var
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 21:08:08 +00:00
Victor Vieux
e7cc88c39f bump API version
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 21:08:07 +00:00
Victor Vieux
795ed6b1e5 Rewrite docker rmi
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-25 21:08:07 +00:00
Tianon Gravi
7bce5957a0 Convert api/server.go to also use the handy user package
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-25 13:07:19 -07:00
Victor Vieux
4434b63ff4 fix gofmt
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-24 23:10:45 +00:00
Solomon Hykes
551355c9ad api/common.go: code shared by the server and client implementation of the Docker remote api.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:54:50 -08:00
Solomon Hykes
919665a20a Register built-in engine commands at runtime instead of compile-time
This allows selective loading of commands, and paves the way to dynamic
plugins.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 19:24:29 +00:00
jakedt
7dcbae485c Fix build command auth by adding the auth config and registry objects to the build job environment.
Docker-DCO-1.1-Signed-off-by: Jake Moshenko <jake@devtable.com> (github: jakedt)
2014-02-20 19:22:13 -05:00
Jake Moshenko
90b0cce07b Fix registry auth by storing the string passed on the command line, and allowing for credential selection by normalizing on hostname. Also, remove remote ping calls from CmdPush and CmdPull.
Docker-DCO-1.1-Signed-off-by: Jake Moshenko <jake@devtable.com> (github: jakedt)
2014-02-20 18:32:33 -05:00
Sven Dowideit
940c381dd5 my attempt to disentagle repository and registry (Issue #1439)
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-02-18 20:16:08 +10:00
Victor Vieux
4187f4e750 Merge pull request #4168 from crosbymichael/add-listenbuffer
Hold connections until the daemon has fully loaded
2014-02-17 16:04:49 -08:00
Michael Crosby
e23190b6b3 Improve error message only if no body is returned
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-17 15:29:52 -08:00
Michael Crosby
d55cc64c4e Revert "Merge pull request #4151 from crosbymichael/improve-404-client-message"
This reverts commit 6dd1bb9eb0, reversing
changes made to 23aec9d7fc.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-17 15:25:00 -08:00
Michael Crosby
e743021193 Move job register into servapi
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-17 15:10:51 -08:00
Victor Vieux
382659e03a Merge pull request #4113 from SvenDowideit/build-quiet-help
add a little reenforcement to the help for docker build -q
2014-02-17 10:38:43 -08:00
Sven Dowideit
797b7d3446 add a little reenforcement to the help for docker build -q
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-02-17 11:35:55 +10:00
Fabio Falci
a51441278a docker cp error when container doesn't exist
Fix cp api to return a 404 notfound if container doesn't exist.
Fixes #4119.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
2014-02-16 15:49:36 +00:00
Michael Crosby
d5e41c1cb6 Change name to listenbuffer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-15 21:10:37 -08:00
Michael Crosby
778f1bf663 Integration generic socket wait for docker api
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-15 20:49:50 -08:00
Michael Crosby
64716a21e4 Use socket activation pkg for listeners
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-15 20:24:55 -08:00
Solomon Hykes
44e10433c7 api/container.go: an API-specific representation of a container
This breaks the dependency from the remote API implementation to the
internal representation of a container. Instead it uses its own partial
representation of a container, with only required fields.

* This preserves reverse-compatibility with all past implementations of the remote API.

* This clarifies which fields are guaranteed to be present in a response
	A docker remote api server *may* return more fields in a Container
	object, but their presence and semantics are not guaranteed and should
	not be relied upon by client implementations.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 23:24:51 +00:00
Solomon Hykes
567a422a65 Remove duplicate function displayablePorts
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 14:55:57 -08:00
Solomon Hykes
ee59ba969f Move remote api client to api/
This moves `commands.go` out of the core and into `api/client.go`

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 14:55:51 -08:00
Michael Crosby
968f4800b5 Merge pull request #4128 from vieux/fix_header_content-type_api
Fix header content type api
2014-02-13 20:29:09 -05:00
Victor Vieux
0b403b3531 fix content-type for legacy
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-13 19:24:40 +00:00
Victor Vieux
4611a6bdd3 fix content-type for job.Stdout.Add
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-13 19:21:27 +00:00
unclejack
31dde3ea05 disallow tcp:// from defaulting to 127.0.0.1:4243
This stops docker from accepting tcp:// as a valid bind address.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-02-13 13:54:37 +02:00
Solomon Hykes
e08a1c53aa Move api-specific code to the api package
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 19:59:52 -08:00
Victor Vieux
5d29749e9d fix --run in docker commit
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-10 23:52:15 +00:00
Guillaume J. Charmes
d5d948a038
Add json content type to /containers/json api endpoint
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-06 09:28:30 -08:00
Darren Shepherd
55e5e37c4f Fix broken images API for version <1.7
Simple typo, "ID" should be "Id".  This is causing the images response
to not have IDs in it.

Docker-DCO-1.1-Signed-off-by: Darren Shepherd <darren.s.shepherd@gmail.com> (github: ibuildthecloud)
2014-02-05 19:09:55 -07:00
Victor Vieux
e43236c78a fix api with old version
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-01 01:24:39 +00:00
Victor Vieux
9eea7f28f0 Move serveapi to api/api.go
Remove api import from server.go
Rename initapi to init server

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 23:06:00 +00:00
Victor Vieux
f556cd4186 move api to it's own package
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-29 19:26:54 +00:00