Commit Graph

312 Commits

Author SHA1 Message Date
Michael Crosby 7e8b2c3836 Make sure only links are removed and not names 2013-10-28 19:19:31 -07: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
Solomon Hykes 464ded79fc Close sqlite persistent connection on SIGINT, SITERM or SIGKILL 2013-10-26 14:28:53 -07:00
Solomon Hykes c1ae1a0e1c Setup daemon pidfile/cleanup in Server.Daemon() instead of main() 2013-10-26 14:26:07 -07:00
Solomon Hykes c542b2f873 Rename ConfigGetenv to ConfigFromJob 2013-10-26 14:24:25 -07:00
Solomon Hykes 7e691e11b0 Rename 'GraphPath' to the more logical 'Root'. This does not affect users except for a slight text change in the usage messge 2013-10-26 14:24:13 -07:00
Solomon Hykes 1b8eef4efb Engine: centralize checks for supported architectures and kernel versions 2013-10-26 14:21:04 -07:00
Solomon Hykes 0d1a825137 Minimal, unintrusive implementation of a cleaner Job API.
* Implement a new package: engine. It exposes a useful but minimalist job API.
* Refactor main() to instanciate an Engine instead of a Server directly.
* Refactor server.go to register an engine job.

This is the smallest possible refactor which can include the new Engine design
into master. More gradual refactoring will follow.
2013-10-26 14:18:13 -07:00
Victor Vieux 516cf54843 prevent default name to be deleted and return an error on invalid link 2013-10-25 16:49:49 -07:00
Michael Crosby 7c08aeeba4 Use persistent connection for links database
Add close method to Runtime and Server to make sure
that any underlying connections are cleaned up
2013-10-25 15:13:25 -07:00
Victor Vieux 89fb51f606 fix merge issue and gofmt 2013-10-25 15:13:25 -07:00
Michael Crosby 1cbdaebaa1 Add links for container relationships and introspection 2013-10-25 15:13:24 -07:00
Victor Vieux 93810b289c fix wrong untag while docker rmi 2013-10-21 17:03:32 -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
Karl Grzeszczak ad723bbfe7 Initial steps to fix Issue #936
Use utils.Errorf instead of utils.Debugf
2013-10-11 08:04:40 -05:00
Victor Vieux 1daf242c8b fix rm -v 2013-10-08 16:35:47 +00: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
Guillaume J. Charmes cb18a6e1b9
Update docs + fix endian issue 2013-09-26 17:36:21 -07:00
Guillaume J. Charmes e854b7b2e6
Make StdCopy works with huge amount of data 2013-09-11 14:49:33 -07:00
Guillaume J. Charmes 8ae5348a51 Split stdout stderr for non-tty commands 2013-09-11 14:48:22 -07:00
shin- c6dc90ccb9 Fixed push bug 2013-09-11 19:39:33 +02:00
Michael Crosby ad152efbed Merge pull request #1759 from bdon/graph-map
Minor refactor of Graph; replace uses of Graph.All (slice) with Graph.Map (map)
2013-09-10 08:49:11 -07: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
Victor Vieux 843f9091f2 Merge branch 'filter' of https://github.com/reds/docker into reds-filter 2013-09-09 22:16:16 +00:00
Solomon Hykes e503f6a878 Merge pull request #1825 from dotcloud/merge-builder-runtime
Refactor to merge builder.go into runtime.go
2013-09-09 15:11:41 -07:00
shin- 64bc08f1c4 Push tags to registry even if images are already uploaded 2013-09-09 21:02:37 +02:00
Solomon Hykes 24e02043a2 Merge builder.go into runtime.go 2013-09-06 17:33:05 -07:00
Martin Redmond b44d113120 filter image listing using path.Match 2013-09-06 16:16:10 -04:00
Martin Redmond 35bcba8011 improve image listing 2013-09-06 15:51:49 -04:00
shin- 98a1314251 Merge branch 'mhennings-1357-implement-login-with-private-registry' into api_1_5 2013-09-04 22:27:04 +02:00
shin- b3a70d767d Compute dependency graph and upload layers in the right order when pushing 2013-09-04 02:21:40 +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
Brandon Liu 1fca99ad90 Replace Graph.All with Graph.Map 2013-08-31 20:44:42 -07:00
shin- 98018df078 More descriptive, easier to process container portmappings information in the API 2013-08-28 00:20:35 +02:00
shin- 093b85b72f Use additional decorator in RequestFactory to pass meta headers to registry 2013-08-22 21:15:31 +02:00
Marco Hennings 3f802f4a13 Fix race conditions in parallel pull
During parallel pull of a repostiory it can happen that the same layer
is pulled more than once.

To fix this I have extended the locking code to
- avoid multiple pulls of the same image
- avoid multiple pulls of the same layer


If an error occurs the other layers are awaited before returning as leaving
the scope before the go routines leave causes crashes of the server sometimes
if the download status is updated while the http stream is already closed


Beside this I have extended status display.
2013-08-22 13:23:43 +02:00
Michael Crosby 56e02dd0c7 Merge pull request #1588 from dotcloud/1561_fix_warning_in_tests
assume ip_forwarding = 1 by default
2013-08-21 09:15:23 -07:00
Michael Crosby 04c16f347b Merge pull request #1396 from calavera/985-ordered-api-images
Sort APIImages by most recent creation date.
2013-08-19 09:41:39 -07:00
Victor Vieux b21f898620 assume ip_forwarding = 1 by default 2013-08-19 12:34:30 +00:00
David Calavera e6affb1b1a Sort images by tag name when the creation date is the same.
This establishes a strict alphabetical order for tags with the same creation date.
2013-08-17 22:11:34 -07:00
Evan Phoenix 07a887032a Show tag used when image is missing 2013-08-17 20:03:54 -07:00
Michael Crosby 15bc2240ac Merge pull request #1505 from dotcloud/improve_events
Add image name in /events
2013-08-14 15:40:36 -07:00
Victor Vieux c84d74df8c add missing ParseRepositoryTag 2013-08-14 16:59:21 +00:00
Pascal Borreli 9b2a5964fc Fixed typos 2013-08-12 18:53:06 +01:00
Victor Vieux 703905d7ec ensure the use oh IDs and add image's name in /events 2013-08-12 11:50:03 +00:00
Victor Vieux 213365c2d2 fix docker build and docker events output 2013-08-08 22:51:39 +00:00
Victor Vieux be77ee33bc Merge branch 'master' into add_some_tests 2013-08-08 14:44:56 +00:00
Guillaume J. Charmes 6249cc3373 Merge pull request #1425 from dotcloud/simplify_ProgressReader
- Runtime: fix small \n error un docker build
2013-08-07 16:19:42 -07: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
Guillaume J. Charmes 65a4e30825 Merge pull request #1093 from monnand/910-login-info
* Runtime: fixed #910. print user name to docker info output
2013-08-07 15:09:55 -07: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
Victor Vieux ba17f4a06a fix small \n error un docker build 2013-08-06 14:31:51 +00:00
Nan Monnand Deng 303490168f Added index address into APIInfo. 2013-08-05 23:36:55 -04:00
Victor Vieux 946bbee39a rebase master 2013-08-05 16:25:42 +00:00
David Calavera cd6aeaf979 Sort APIImages by most recent creation date.
Fixes #985.
2013-08-03 15:35:36 -07:00
Nan Monnand Deng 5bc344ab73 factory generated from one place. 2013-08-02 04:10:26 -04:00
Nan Monnand Deng 4bd287e107 auth with user agent 2013-08-02 03:30:45 -04:00
Nan Monnand Deng 6a56b7b391 Server now use request factory 2013-08-02 03:23:46 -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 6166380d76 rebase master 2013-07-30 16:51:50 +00:00
Victor Vieux bcd6ca3685 Merge pull request #1268 from dotcloud/refactor_checksum
Refactor checksum
2013-07-30 06:07:54 -07:00
Victor Vieux 46f59dd933 add parallel pull to 1.4 2013-07-30 12:15:33 +00:00
Victor Vieux e1fa989ec9 rebase master 2013-07-30 11:59:31 +00:00
Victor Vieux 0b57e4483a Merge branch 'master' into 1237-improve_docker_top-feature 2013-07-30 11:51:16 +00:00
Guillaume J. Charmes 5b27652ac6
Make sure the index also receives the checksums 2013-07-29 11:30:21 -07:00
Guillaume J. Charmes 0f134b4bf8 Remove unused parameter 2013-07-29 11:30:17 -07:00
Guillaume J. Charmes 0badda9f15 Refactor the image size storage 2013-07-29 11:30:17 -07:00
Guillaume J. Charmes e3f68b22d8 Handle extra-paremeter within checksum calculations 2013-07-29 11:30:17 -07:00
Guillaume J. Charmes 8ca7b0646e Refactor checksum 2013-07-29 11:30:17 -07:00
Victor Vieux 63876e7dbd use ParseRepositoryTag instead on split on : in imagedelete 2013-07-29 12:15:27 +00:00
Victor Vieux e592f1b298 add regression test 2013-07-26 10:30:36 +00:00
Victor Vieux e608296bc6 fix wrong untag when using rmi via id 2013-07-26 09:19:26 +00:00
Victor Vieux 8742649aa7 improve client output 2013-07-24 17:10:59 +00:00
Victor Vieux 0e71e368a8 Add ID to JSONMessage in pull
Use goroutines to pull in parallel
If multiple images pulled at the same time, each progress is displayed on a new line
2013-07-24 15:41:34 +00:00
Victor Vieux dfc076a123 Merge pull request #1243 from dotcloud/add_lxc_version_docker_info
*Client: LXC and Kernel version to docker info in debug mode
2013-07-24 07:44:23 -07:00
Victor Vieux 066873ebd2 rebase master 2013-07-24 14:38:40 +00:00
Victor Vieux f6e1055727 Merge pull request #1064 from monnand/156-user-agent-header
Add user agent when calling the registry
2013-07-24 06:40:53 -07:00
Victor Vieux 6057e6ad70 add kernel version 2013-07-24 13:36:55 +00:00
Victor Vieux ca39f15fa3 bump master 2013-07-24 13:28:01 +00:00
Nan Monnand Deng 1ae54707a0 versionCheckers()->versionInfos(). 2013-07-23 17:17:31 -04:00
Nan Monnand Deng ede1e6d475 Rename: VersionChecker->VersionInfo. 2013-07-23 17:05:13 -04:00
Victor Vieux 040c3b50d0 use non-blocking channel to prevent dead-lock and add test for server 2013-07-23 15:42:34 +00:00
Victor Vieux 2e4d4c9f60 add since for polling, rename some vars 2013-07-23 15:41:19 +00:00
Victor Vieux b8d52ec266 add timestamp and change untagged -> untag 2013-07-23 15:41:19 +00:00
Victor Vieux b5da816487 basic version of the /events endpoint 2013-07-23 15:41:19 +00:00
Victor Vieux c81662eae4 Merge branch 'master' into 1237-improve_docker_top-feature
Conflicts:
	docs/sources/api/docker_remote_api.rst
2013-07-22 16:22:11 +00:00
Victor Vieux 921c6994b1 add LXC version to docker info in debug mode 2013-07-19 16:36:23 +00:00
Victor Vieux 0bd534adcf Merge pull request #1211 from dotcloud/new_logs
*Runtime: Logs are now synchronised
2013-07-19 06:43:29 -07:00
Victor Vieux cfec1c3e1b add ps args to docker top 2013-07-19 10:06:32 +00:00
Nan Monnand Deng cd209f406e documentation. 2013-07-18 14:22:49 -04:00
Victor Vieux 1b0fd7ead3 add debug and simplify docker logs 2013-07-18 13:29:40 +00:00
Victor Vieux a926cd4d88 add legacy support 2013-07-18 13:25:47 +00:00
Victor Vieux 2db99441c8 prevent any kind of operation simultaneously 2013-07-17 20:39:36 +00:00
Victor Vieux 5a934fc923 fix docker rmi via id 2013-07-17 15:48:53 +00:00
Victor Vieux fb005a3da8 add server.ContainerTop, server.poolAdd and ser.poolRemove tests 2013-07-16 14:38:18 +00:00
Victor Vieux 599f85d4e4 store both logs in a same file, as JSON 2013-07-15 16:17:58 +00:00
Marcus Farkas bac5772312 *Client: Fix the progressbar, without manipulating other outputs
Prior this commit, 'docker images' and other cmd's, which used utils.HumanSize(),
showed unnecessary whitespaces.
Formatting of progress has been moved to FormatProgess(), justifing the string
directly in the template.
2013-07-12 20:15:25 +02:00
Victor Vieux 9232d1ef62 Merge branch 'master' into list_container_processes-feature 2013-07-12 11:47:27 +00:00
Nan Monnand Deng d40efc4648 added client's kernel version 2013-07-10 18:56:49 -04:00