Commit Graph

326 Commits

Author SHA1 Message Date
Victor Vieux 8291f00a0e refactor and fix tests 2013-12-09 16:25:19 -08:00
Solomon Hykes de35b346d1 Port 'docker version' to the engine API 2013-12-08 07:41:53 +00:00
Solomon Hykes 9656cdf0c2 Engine: 'export' returns a raw archive of a container's filesystem 2013-12-08 01:33:37 +00:00
Solomon Hykes 3569d080af New engine command: 'wait' 2013-12-06 23:05:21 +00:00
Solomon Hykes fdb3de7b11 Engine: new command 'kill' sends a signal to a running container 2013-12-06 23:02:27 +00:00
Victor Vieux 228091c79e added authConfig to docker build 2013-12-06 14:27:10 -08:00
Victor Vieux 97088ebef7 sd_notify ready status when accepting API requests 2013-12-04 17:50:20 -08:00
Guillaume J. Charmes 944c1f10ea Merge pull request #2967 from crosbymichael/return-host-config
Add hostconfig to container inspect
2013-12-04 16:50:42 -08:00
Victor Vieux 12180948be remove unused parameter in Download 2013-12-04 11:54:11 -08:00
Paul Nasrat 6a55169e2e Expose expvar endpoint during debugging.
Fixes #3017
2013-12-03 13:04:18 -05:00
Michael Crosby c4c90e9cec Add hostconfig to container inspect 2013-12-02 18:06:04 -08:00
Guillaume J. Charmes de4429f70d
Do not format at each write but use a Writer instead (build) 2013-12-02 11:43:41 -08:00
Johannes 'fish' Ziemke e4cb83c50e Bump api version and update docs 2013-12-02 19:27:28 +01:00
Johannes 'fish' Ziemke b04c6466cd Make docker build return exit code of build step
If a command during build fails, `docker build` now returns with
the exit code of that command.

This makes it necessary to change the build api endpoint to
return a json object stream.
2013-12-02 17:52:37 +01:00
Solomon Hykes a4f8a2494b Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
2013-11-30 00:25:46 +00:00
Paul Nasrat 9f46779d42 Wire in pprof handlers.
Based on http://stackoverflow.com/questions/19591065/profiling-go-web-application-built-with-gorillas-mux-with-net-http-pprof
2013-11-28 13:46:58 -05:00
Paul Nasrat abfdaca3f8 Fix data race in TestLogEvent
Found with -race. Improve locking on Server.
2013-11-25 14:17:58 -05:00
Michael Crosby fd7ab143bf Allow images to be saved and loaded by id and repository 2013-11-20 17:28:19 -08:00
Michael Crosby 2bc35287a0 Merge pull request #2723 from SvenDowideit/doc-build-image
Use the work Path for docker cp CONTAINER:PATH
2013-11-20 11:10:13 -08:00
Frederick F. Kautz IV 1211065c8d Adding content type to images/(name)/get 2013-11-20 03:52:33 +00:00
Frederick F. Kautz IV 7eaa59f626 Offline Image Transfers #1155 2013-11-20 03:52:33 +00:00
Victor Vieux 0169cf15dd don't import emport empty hostconfig 2013-11-19 18:28:50 -08:00
Guillaume J. Charmes 5e941f1ca0
Lintify code with confidence=1 2013-11-18 16:24:11 -08:00
Sven Dowideit 27159ce6ba expunge the word 'Resource' in reference to a file/dir in a CONTAINER - that way users don't wonder how its different from a Path 2013-11-16 20:15:04 +10:00
Michael Crosby 51576069ad Merge pull request #2694 from shykes/separate-integration-tests
Separate integration tests
2013-11-15 18:21:34 -08:00
Solomon Hykes 693ff4d2ae Fix the brittle errorstring-to-httperror recognition code which in turn is required by autopull (the client issues a pull if container creation returns 404) 2013-11-14 23:54:28 +00:00
Solomon Hykes 359a6f49b9 Move integration tests to integration/, expose missing public methods in the core 2013-11-14 10:50:00 -08:00
Solomon Hykes 6c4393ccbb Merge branch 'job-create-start-clean' into engine-patch-2
Conflicts:
	engine/engine.go
	engine/job.go
	server.go
	utils_test.go
2013-11-13 00:36:20 +00:00
Mark Allen 8cc19765b4 Edits after code review
Return long image ID
Return streamformatted error or "raw" error
2013-11-10 00:06:55 -06:00
David Sissitka 5957dd9091 Make "docker insert" errors obvious
Closes #1130
See also #1942
2013-11-08 00:15:19 -06:00
Nate Jones 8f64759881 bring back /images/viz, but 404 for latest 2013-11-06 03:58:15 +00:00
Nate Jones 2a5998baf1 move "images -viz" to client 2013-11-06 03:58:15 +00:00
Nate Jones d7928b9a67 bump api version and ensure backward compat 2013-11-06 03:58:15 +00:00
Solomon Hykes e5f8ab6160 Engine: 'create' creates a container and prints its ID on stdout 2013-11-05 23:00:20 +00:00
Solomon Hykes 434f06d03d Engine: fix a bug when encoding a job environment to json 2013-11-05 23:00:20 +00:00
Solomon Hykes 958b4a8757 Engine: 'start' starts the specified container 2013-11-05 18:39:59 +00:00
Michael Crosby 2a0efb2324 Merge pull request #2427 from thequux/send-headers-immediately
Make /events API send headers immediately
2013-11-04 08:49:27 -08:00
Dan Hirsch a963ff5d8d Added explicit Flush method to utils.WriteFlusher 2013-11-01 13:11:21 -04:00
Michael Crosby 96d1e9bb5a Move archive.go to sub package 2013-10-31 16:57:45 -07:00
Dan Hirsch dd9f4524d1 Make /events API send headers immediately
Go's net/http API does not send headers until the first call to
ResponseWriter.Write().  Ordinarily, this is fine, because in most
cases, responses are returned immediately.  However, for the events
API, nothing is written until some event is sent, which causes
timeouts and/or hangs in some HTTP client APIs, which wait for headers
before returning from the "make request" call.
2013-10-28 21:39:21 -04:00
Michael Crosby 0d2924408b Add -name for docker run
Remove docker link
Do not add container id as default name
Create an auto generated container name if not
specified at runtime.
2013-10-28 18:09:08 -07:00
Victor Vieux 256b7537e3 no more name encoding 2013-10-25 15:13:25 -07:00
Victor Vieux c4923757f1 replace == by HasPrefix for names and improve error message 2013-10-25 15:13:25 -07:00
Michael Crosby 0e24db3a68 Updated fixes post rebase from master
Removed test cases that are no longer
applicable with links and the port changes.
Remove test case where a test was hitting an
external ip.
2013-10-25 15:13:24 -07:00
Michael Crosby 1cbdaebaa1 Add links for container relationships and introspection 2013-10-25 15:13:24 -07:00
Guillaume J. Charmes 333bc23f21 Fix issue killing container while sending signal
Fix rebase issue
Update docs
2013-10-18 16:19:27 -07:00
Guillaume J. Charmes 4918769b1a Add -nostdin and -proxy to docker attach, allow arbirary signal to be sent via docker kill api endpoint
Allow attach from `docker start`
Add host integration script generation
Update doc with host integration
2013-10-18 16:16:29 -07:00
Victor Vieux 3acfc60028 change an errorf to a debugf 2013-10-16 19:45:10 +00:00
Victor Vieux 0e64a4d7e7 remove false alarm error 2013-10-16 19:38:12 +00:00
Michael Crosby 4196c704f0 Merge pull request #1943 from dotcloud/1940-prevent_crash_parseNat_build-fix
Abort build if mergeConfig returns an error and fix duplicate error message
2013-10-15 17:40:48 -07:00
Karl Grzeszczak ad723bbfe7 Initial steps to fix Issue #936
Use utils.Errorf instead of utils.Debugf
2013-10-11 08:04:40 -05:00
Guillaume J. Charmes f435970695 Merge pull request #1842 from dotcloud/split_stdout_stderr
* Runtime: Split stdout stderr
2013-09-26 18:05:24 -07:00
Victor Vieux 5bd0437eed abord build if mergeConfig returns an error and fix duplicate error message 2013-09-20 12:46:24 +00:00
Michael Crosby 8d48119340 Merge pull request #1894 from dotcloud/1891-remove_useless_warnings
Don't show network related warnings when networking is disabled
2013-09-16 13:48:17 -07:00
Michael Crosby 45b50730e3 Merge pull request #1849 from dotcloud/better_handle_hostConfig
Improved hostConfig reload
2013-09-16 10:48:53 -07:00
Victor Vieux 40eaa82fc6 Don't show network related warnings when networking is disabled 2013-09-16 15:58:44 +00:00
Michael Crosby b7a3fc687e Add rm option to docker build to remove intermediate containers 2013-09-12 16:55:36 +00:00
Guillaume J. Charmes 082d142024
Add documentation 2013-09-11 15:41:44 -07:00
Guillaume J. Charmes e854b7b2e6
Make StdCopy works with huge amount of data 2013-09-11 14:49:33 -07:00
David Sissitka 71d46eaf02 Fixed a bug I created when rebasing. 2013-09-11 01:39:55 -07:00
David Sissitka f4ba0d4267 Replaced leading spaces with tabs. Again. 2013-09-11 01:28:20 -07:00
David Sissitka d48ea32186 Updated postContainersCreate to use writeJSON. 2013-09-11 01:26:26 -07:00
David Sissitka 33e4d73629 Replaced leading spaces with tabs. 2013-09-11 01:07:05 -07:00
David Sissitka 07324a37eb Rebased. 2013-09-11 01:03:17 -07:00
David Sissitka dd49cc45c8 Added a status code argument to writeJSON. 2013-09-11 00:23:53 -07:00
Victor Vieux f482432a76 improved hostConfig reload 2013-09-10 22:13:15 +00:00
Victor Vieux 2801624462 Merge pull request #1796 from shin-/api_1_5
*Remote API: Bumped API version to 1.5
*Registry: Implement login with private registry
*Remote API: Improve port mapping information
2013-09-09 16:58:54 -07:00
Michael Crosby f3d51bb3d5 Merge pull request #1810 from dotcloud/1798-inspect-fix
Detect images/containers conflicts in docker inspect
2013-09-05 17:17:09 -07:00
Victor Vieux 0d7044955a remove unused getCache endpoint 2013-09-05 23:00:52 +00:00
Victor Vieux 5ec2fea6dd Detect images/containers conflicts in docker inspect 2013-09-05 22:31:17 +00:00
shin- 9ae5054c34 Bumped API version in api.go ; added <1.5 behavior to getContainersJSON 2013-09-04 23:41:44 +02:00
shin- dd4aab8411 Use base64 encoding 2013-09-03 20:59:48 +02:00
shin- d04beb7f43 Pass auth config through headers rather than as URL param 2013-09-03 20:59:48 +02:00
Marco Hennings a2603477dd Merge on current master 2013-09-03 20:59:48 +02:00
Marco Hennings da3bb9a7c6 Move authConfig to a Parameter on postImagePush, too 2013-09-03 20:59:48 +02:00
Marco Hennings fcee6056dc Login against private registry
To improve the use of docker with a private registry the login
command is extended with a parameter for the server address.

While implementing i noticed that two problems hindered authentication to a
private registry:

1. the resolve of the authentication did not match during push
   because the looked up key was for example localhost:8080 but
   the stored one would have been https://localhost:8080

   Besides The lookup needs to still work if the https->http fallback
   is used

2. During pull of an image no authentication is sent, which
   means all repositories are expected to be private.

These points are fixed now. The changes are implemented in
a way to be compatible to existing behavior both in the
API as also with the private registry.

Update:

- login does not require the full url any more, you can login
  to the repository prefix:

  example:
  docker logon localhost:8080

Fixed corner corner cases:

- When login is done during pull and push the registry endpoint is used and
  not the central index

- When Remote sends a 401 during pull, it is now correctly delegating to
  CmdLogin

- After a Login is done pull and push are using the newly entered login data,
  and not the previous ones. This one seems to be also broken in master, too.

- Auth config is now transfered in a parameter instead of the body when
  /images/create is called.
2013-09-03 20:45:49 +02:00
David Sissitka f6b56e996d Updated "POST /containers/create" to return the right Content-Type. 2013-08-29 09:14:14 -07:00
shin- 093b85b72f Use additional decorator in RequestFactory to pass meta headers to registry 2013-08-22 21:15:31 +02:00
Victor Vieux b21f898620 assume ip_forwarding = 1 by default 2013-08-19 12:34:30 +00:00
Daniel Mizyrycki 999a8d7249 API, issue 1471: Allow users belonging to the docker group to use the docker client 2013-08-12 15:16:49 -07:00
Michael Crosby 3e12349831 Merge pull request #1484 from titanous/use-range
Use ranged for loop on channels
2013-08-09 18:06:12 -07:00
Jonathan Rudenberg 7c50221de5 Use ranged for loop on channels 2013-08-09 20:42:20 -04:00
Guillaume J. Charmes 92cd2f5bad Merge pull request #1146 from benoitc/feature/attach_ws
* Runtime: add websocket support to /container/<name>/attach/ws
2013-08-09 15:38:24 -07:00
Michael Crosby 28d38620f0 Merge pull request #1417 from crosbymichael/root-socket
Change daemon to listen on unix socket by default
2013-08-08 17:06:49 -07:00
Colin Rice 3e491f8698 Fix reversed IPv4Forwarding check in api.go 2013-08-07 18:28:40 -04:00
Colin Rice 10190be5d7 Add warning when net.ipv4.ip_forwarding = 0
Added warnings to api.go, container.go, commands.go, and runtime.go
Also updated APIInfo to return whether IPv4Forwarding is enabled
2013-08-07 18:28:39 -04:00
benoitc e2ca600fd8 Merge branch 'feature/attach_ws' into feature/attach_ws2
Conflicts:
	api.go
2013-08-07 23:30:28 +02:00
Michael Crosby d94b186080 Strip leading forward slash from resource 2013-08-06 16:09:54 +00:00
Michael Crosby 5b8cfbe15c Add cp command and copy api endpoint
The cp command and copy api endpoint allows users
to copy files and or folders from a containers filesystem.

Closes #382
2013-08-06 16:09:54 +00:00
Michael Crosby 754ed9043d Use mime types to parse Content-Type 2013-08-06 15:57:13 +00:00
Michael Crosby 8934f13615 Change daemon to listen on unix socket by default 2013-08-06 00:12:56 +00:00
Victor Vieux 946bbee39a rebase master 2013-08-05 16:25:42 +00:00
Victor Vieux feda3db1dd Merge pull request #1382 from monnand/650-http-utils
650 http utils and user agent field
2013-08-05 08:49:12 -07:00
Guillaume J. Charmes 3e9575e275
Consider empty /etc/resolv.conf as local dns + add unit test 2013-08-02 15:23:36 -07:00
Michael Crosby 3a123bc479 Add no cache for docker build
Add a new flag to disable the image cache when building images.
2013-08-02 16:18:54 +00:00
Nan Monnand Deng 4bd287e107 auth with user agent 2013-08-02 03:30:45 -04:00
Victor Vieux 0c0077ed6f Merge pull request #1328 from dotcloud/1307_url_port_delete-fix
Use utils.ParseRepositoryTag instead of strings.Split(name, ":") in server.ImageDelete
2013-07-31 07:55:06 -07:00
Victor Vieux a7068510a5 fix same issue in api.go 2013-07-31 08:01:20 +00:00
Victor Vieux 46f59dd933 add parallel pull to 1.4 2013-07-30 12:15:33 +00:00
Victor Vieux 0b57e4483a Merge branch 'master' into 1237-improve_docker_top-feature 2013-07-30 11:51:16 +00:00