Commit Graph

750 Commits

Author SHA1 Message Date
Nate Jones b7d1d35c27 add image size to -tree 2013-11-06 04:23:07 +00:00
Nate Jones ec9a9a08b8 implement "images -tree" 2013-11-06 03:58:16 +00:00
Nate Jones 2a5998baf1 move "images -viz" to client 2013-11-06 03:58:15 +00:00
Nate Jones 15867ff430 rework images JSON 2013-11-06 03:58:15 +00:00
Andy Rothfusz 962a66cd36 Merge pull request #2460 from SvenDowideit/2294-use-repo-colon-tag-everywhere
covert docker (commit|import|tag) to use REPOSITORY[:TAG]
2013-11-05 10:29:54 -08:00
Victor Vieux a482bfd715 Merge pull request #2382 from dotcloud/reflect_future_changes_search_api
Update docker search to reflect future changes of the api
2013-11-04 16:14:14 -08:00
Victor Vieux 854cc5f559 remove column size hack 2013-11-04 15:34:51 -08:00
Victor Vieux 1f44fd8624 Fix logs with tty 2013-11-04 12:19:20 -08:00
Sven Dowideit b840b73b08 tiny table heading tweak for #2149 - change ID to CONTAINER ID/IMAGE ID or IMAGE (the later if it could be an ID or a repo:tag 2013-11-04 22:10:51 +10:00
Sven Dowideit 1f3cdc11ee conert docker (commit|import|tag) to use REPOSITORY[:TAG] (and repove support for REPOSITORY TAG) 2013-11-04 22:07:55 +10:00
Victor Vieux fc45535197 Merge pull request #2503 from dotcloud/2500-inspect-fix
Client: Inspect fix
2013-11-01 15:24:05 -07:00
Victor Vieux 8f27e23b4b Merge pull request #2457 from dotcloud/2454_do_not_split_last_column
RemoteAPI: Do not split last column docker top
2013-11-01 15:21:47 -07:00
Victor Vieux 747967b4a4 rebase and add some filters 2013-10-31 19:25:55 -07:00
Victor Vieux 02b5202432 update docker search to reflect future changes of the api 2013-10-31 19:14:11 -07:00
Victor Vieux a89a98e594 fix inspect error message 2013-10-31 18:50:58 -07:00
Victor Vieux 40ed10cc32 fix inspect when it returns nothing valid 2013-10-31 18:39:44 -07:00
Michael Crosby 96d1e9bb5a Move archive.go to sub package 2013-10-31 16:57:45 -07:00
Victor Vieux 4b8a176ee0 Merge pull request #2432 from SvenDowideit/doc-stop-kill-details
IRC: add SIGTERM and SIGKILL details to docker stop and kill docco
2013-10-30 18:57:07 -07:00
Travis Cline 1099d172a2 Add flags to history, add size flag 2013-10-30 19:41:20 -05:00
Victor Vieux fb4672c52c do not split last column docker top 2013-10-29 19:03:41 -07:00
Victor Vieux 700a71e6b6 stop proxy at one point 2013-10-29 14:29:01 -07:00
Victor Vieux e0b59ab52b Enable sig-proxy by default in run and attach 2013-10-29 11:18:34 -07:00
Sven Dowideit 82f1514895 docker stop sends SIGTERM and SIGKILL, docker kill sends SIGKILL 2013-10-29 13:37:43 +10:00
Michael Crosby b038b0cd44 Merge pull request #2162 from dotcloud/links
Links and Container Naming
2013-10-28 19:24:10 -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
Victor Vieux d5c7e92a9a fix docker ps display 2013-10-25 17:36:23 -07:00
Victor Vieux 13c521526d only pass stdin to hijack when needed 2013-10-25 17:17:33 -07:00
Victor Vieux 66a159342b update docker port command 2013-10-25 15:13:25 -07:00
Victor Vieux 6c863b49ef remove docker ls and add docker link in usage and switch to go1.2rc2 2013-10-25 15:13:25 -07:00
Victor Vieux 256b7537e3 no more name encoding 2013-10-25 15:13:25 -07:00
Victor Vieux 387aeb78fb refactor notrunc in commands.go to add names support 2013-10-25 15:13:24 -07:00
Alexander Larsson d063c8d941 Move ListOps to utils submodule
This will be needed for later use in docker-init without a docker
dependency
2013-10-25 15:13:24 -07:00
Michael Crosby 515070d513 Remove docker ls from docs and cli usage 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
Victor Vieux 31111f61e0 Merge pull request #1963 from rogpeppe/master
Client: Use less reflection in command-line method invocation
2013-10-24 18:03:20 -07:00
Victor Vieux 0e44864b66 change logic for tty resize to avoid warning in tests 2013-10-24 14:54:04 -07:00
Victor Vieux 656b66e51b monitor the tty after starting the container 2013-10-24 11:19:06 -07:00
Victor Vieux b0515a7016 Merge pull request #2279 from dotcloud/fix_docker_inspect
Client: improve docker inspect
2013-10-22 17:17:35 -07:00
Victor Vieux 01284cbf73 fix status code 2013-10-22 15:39:51 -07:00
Gurjeet Singh 7e09c6332d Place 'top' subcommand's help in proper order. 2013-10-20 02:15:36 -04:00
Guillaume J. Charmes 9bceae2440 Add a chan to hijack() to block until the hijack is completed 2013-10-18 16:26:29 -07:00
Guillaume J. Charmes e7269b9841 Fix issue with autoremove 2013-10-18 16:26:29 -07:00
Guillaume J. Charmes 3e014aa662 Fix attach race condition, improve unit tests, make sure the container is started before unblocking Start 2013-10-18 16:26:16 -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
Roger Peppe 43fd85eb8f Merge remote-tracking branch 'upstream/master'
Conflicts:
	commands.go
2013-10-18 09:22:20 +01:00
Victor Vieux 8bce284496 clean split between errors and output. JSON output always valid 2013-10-17 23:40:43 +00: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
Johan Rydberg 967010ae8c Use correct auth config when logging in. 2013-10-08 06:46:29 +02:00
Michael Crosby 723de87681 Move run -rm to the cli only 2013-09-26 14:52:37 -07: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 2fafe1efce Merge pull request #1948 from dotcloud/fix_attach
Fix attach issue
2013-09-23 02:15:51 -07:00
Roger Peppe 181b9baddd use less reflection in command line method invocation 2013-09-23 01:06:31 +01:00
Guillaume J. Charmes 2bd089dadb
Fix attach issue 2013-09-20 11:31:00 -07:00
David Sissitka c6b4076125 Fixed HTTP imports. 2013-09-15 18:40:29 -07: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 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
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 46a1cd69a9 only os.Exits on error 2013-09-09 21:26:35 +00:00
Victor Vieux 9b088ada7e Merge pull request #1812 from dotcloud/return-run-exit-code
*Client: Return the process exit code for run commands
2013-09-09 14:10:46 -07:00
Michael Crosby 3bc73fa21e Return the process exit code for run commands 2013-09-05 23:54:03 +00:00
Victor Vieux 5ec2fea6dd Detect images/containers conflicts in docker inspect 2013-09-05 22:31:17 +00: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- 2ea52dddec Merge branch 'better_api_ports' of git://github.com/shin-/docker into shin--better_api_ports 2013-09-04 22:25:01 +02:00
Marco Hennings ded973219e Move auth header on run cmd 2013-09-03 20:59:48 +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 ad322d7cca Send corrent endpoint authentication when an image is pulled during the run
cmd.
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
Michael Crosby d13c2ed24e Merge pull request #1317 from calavera/login_signal
Exit from `docker login` on SIGTERM and SIGINT.
2013-09-03 11:16:05 -07:00
Thijs Terlouw 6380b42edb Add 2 missing cli commands to docs (events + insert) and alphabetically order docker output 2013-09-03 16:35:22 +02:00
David Calavera ce53e21ea6 Read the stdin line properly.
Load the auth config before it's used.
2013-09-01 16:12:07 -07:00
David Calavera fa3266efa5 Merge branch 'master' into login_signal
* master: (23 commits)
  Made calling changelog before run return empty. Fixes #1705.
  fix error in docker build when param is not a directory
  Document FROM <image>:<tag> Dockerfile instruction.
  Install Ubuntu raring backported kernel from official archives directly.
  Updated "Use -> The Basics" to use ubuntu:12.10.
  hide version when not available
  added a Dockerfile which installs all deps and builds the docs.
  Unable to find image error should print to stderr
  remove message during tests
  use init function
  add TEST env var during tests and silenced parserun during tests
  Update python_web_app.rst
  Update remaining upstart scripts to wait for lxc-net
  Fixed a minor syntax error.
  Add privileged flag in documentation for container creation
  Fix #1685: Notes on production use. General installation cleanup.
  Fix bash completion, remove have
  added apt-key finger tip and fingerprint in ubuntu installation page
  Improve formatting with 'go fmt' as stated in CONTRIBUTING.md
  Start docker after lxc-net to prevent ip forwarding race
  ...
2013-09-01 15:56:59 -07:00
Victor Vieux d605e82bad fix error in docker build when param is not a directory 2013-08-30 18:08:29 +00:00
Michael Crosby 74982bda32 Merge pull request #1738 from jonasi/error-to-stderr
Unable to find image error should print to stderr
2013-08-30 10:43:45 -07:00
Victor Vieux e3b58d3027 hide version when not available 2013-08-30 00:46:43 +00:00
Isao Jonas 4ff649ce85 Unable to find image error should print to stderr 2013-08-29 18:25:11 -05:00
David Calavera 9f8e5a93b4 Use flag.StringVar to capture the command line flags. 2013-08-29 11:46:42 -07:00
David Calavera b8a8962833 Simplify term signal handler. 2013-08-29 11:46:42 -07:00
David Calavera f18889bf67 Print a new line after getting the password from stdin. 2013-08-29 11:46:41 -07:00
David Calavera 6e4a818ee6 Exit if there is any error reading from stdin. 2013-08-29 11:46:41 -07:00
David Calavera 2357fecc92 Stop making a raw terminal to ask for registry login credentials.
It only disables echo asking for the password and lets the terminal to handle everything else.
It fixes #1392 since blank spaces are not discarded as they did before.
It also cleans the login code a little bit to improve readability.
2013-08-29 11:46:41 -07:00
David Calavera 23dc52f528 Allow to generate signals when termios is in raw mode. 2013-08-29 11:45:04 -07:00
David Calavera c3154fdf4d Use a more idiomatic syntax to capture the exit. 2013-08-29 11:45:03 -07:00
David Calavera f1d0625cf8 Exit from `docker login` on SIGTERM and SIGINT.
Fixes #1299.
2013-08-29 11:45:03 -07:00
shin- 98018df078 More descriptive, easier to process container portmappings information in the API 2013-08-28 00:20:35 +02:00
jbbarth d80b50d4b4 Improve formatting with 'go fmt' as stated in CONTRIBUTING.md
As 'go fmt' doesn't support verifying files in multiple directories,
it's probably a good idea to run it on all '*.go' files from time to
time with something like this:

  find . -name "*.go" | xargs dirname | sort -u | xargs -n 1 echo go fmt
2013-08-27 10:05:25 +02:00
Michael Crosby b866254a19 Merge pull request #1636 from unclejack/1594-return_non_zero_when_encountering_error
1594 - return non-zero exit code if at least one container has failed to start
2013-08-26 13:20:31 -07:00
Kawsar Saiyeed d8a18ea3ae Display error if resource not specified
Display an error message if a container resource is not supplied to
'docker cp'.

Fixes error in #1661
2013-08-25 00:28:36 +01:00
unclejack d1ad0e278d return error if at least one container fails to start
This makes docker start exit with exit code 1 if at least one container
didn't start. This also prints an error at the end.
2013-08-23 20:14:06 +03:00
Guillaume J. Charmes 78a71b1273 Merge pull request #1587 from dotcloud/1559_improve_version
Improve version
2013-08-22 17:28:18 -07:00
Guillaume J. Charmes f925edd12d Merge pull request #1525 from griff/1503-fix
Don't read from stdout when only attached to stdin
2013-08-22 13:43:05 -07:00
Michael Crosby 12715c8ddc Merge pull request #1609 from jpetazzo/release-docker-with-docker
Release docker with docker
2013-08-22 13:13:06 -07:00
Michael Crosby 326dadd224 Merge pull request #1565 from dotcloud/only_load_authconfig_when_needed
Load authConfig only when needed and fix useless WARNING
2013-08-22 11:10:16 -07:00
Michael Crosby e0a7013836 Merge pull request #1576 from MatthewMueller/patch-1
updated default -H docs
2013-08-21 09:09:43 -07:00
Matt Mueller 215094903a update help 2013-08-21 02:08:32 -07:00
Solomon Hykes 9087ef9a77 Move VERSION to a dedicated file to facilitate automated builds and releases 2013-08-20 19:32:37 -07:00
Victor Vieux 41973d41e9 fix typo 2013-08-20 11:52:37 +00:00
Victor Vieux 646afab28d improve version 2013-08-19 12:07:49 +00:00
Victor Vieux f6653c3fa5 Merge pull request #1553 from dotcloud/1540_fix_error_message
fix can't connect message with socket
2013-08-19 05:06:21 -07:00
Victor Vieux 18962d0ff3 load authConfig only when needed and fix useless WARNING 2013-08-19 11:42:38 +00:00
Matt Mueller f409c11916 add to cli 2013-08-17 22:10:06 -07:00
Evan Phoenix 07a887032a Show tag used when image is missing 2013-08-17 20:03:54 -07:00
Victor Vieux 62b45f0827 fix can't connect message
with socket
2013-08-15 13:48:08 +00:00
Brian Olsen c7cda86e84 Don't read from stdout in hijack unless attached. Fixes #1503 2013-08-15 02:54:06 +02:00
Michael Crosby 84a0274885 Merge pull request #1249 from unclejack/507-add_sigterm_sigint_handling_to_docker_run
#507 - make docker run handle SIGINT/SIGTERM
2013-08-14 15:00:19 -07:00
Victor Vieux 3c9f9945c9 prevent crash when .dockercfg not readable 2013-08-14 10:26:18 +00:00
Michael Crosby 4947e32acb Merged 0.5.3 hotfix release back to master
Conflicts:
	api.go
	commands.go
	network.go
2013-08-13 23:47:29 +00:00
Victor Vieux 2ba1300773 remove checkIfLogged 2013-08-13 14:02:49 +00:00
Victor Vieux 6cb908bb82 fix merge issue 2013-08-13 13:35:34 +00:00
Michael Crosby c3773740d9 Bump to 0.5.3 2013-08-12 23:55:42 +00:00
Pascal Borreli 9b2a5964fc Fixed typos 2013-08-12 18:53:06 +01: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
unclejack 641ddaeb03 add formatting directive to failure to stop container error 2013-08-09 23:27:34 +03:00
unclejack 2ba5c91547 minor cleanup for signal handling 2013-08-09 23:23:27 +03:00
unclejack 88cb9f3116 keep processing signals after the first one 2013-08-09 20:33:17 +03:00
Solomon Hykes b8f8f9d07e Merged 0.5.2 hotfix release back to master 2013-08-08 19:45:57 -07:00
Michael Crosby e99a99eb6e Bump to v0.5.2 2013-08-09 00:17:35 +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
Guillaume J. Charmes 429d2f85cb Merge pull request #1445 from dsissitka/host
* Runtime: Updated the Docker CLI to specify a value for the "Host" header.
2013-08-07 15:38:50 -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
David Sissitka 416d098688 Updated my last commit to use tabs instead of spaces. 2013-08-07 05:35:38 -04:00
David Sissitka 6bbe66d2e6 Updated the Docker CLI to specify a value for the "Host" header. 2013-08-07 05:33:03 -04: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
Victor Vieux ba17f4a06a fix small \n error un docker build 2013-08-06 14:31:51 +00:00
Nan Monnand Deng 965de6ef50 fixing #910 2013-08-05 23:37:53 -04:00
Nan Monnand Deng 303490168f Added index address into APIInfo. 2013-08-05 23:36:55 -04:00
Guillaume J. Charmes 590fc58de7 Update version. 2013-08-05 14:49:37 -07:00
Nan Monnand Deng 4179f25286 fixed #910. print user name to docker info output 2013-08-05 17:25:29 -04:00
Victor Vieux 946bbee39a rebase master 2013-08-05 16:25:42 +00:00
Victor Vieux a97cf23355 add docs 2013-08-05 11:07:27 +00:00
Guillaume J. Charmes 4dcc0f316c Merge pull request #1298 from crosbymichael/1246-auth-request
* Registry: Do not require login unless 401 is received on push
2013-08-02 17:39:54 -07:00
Michael Crosby dae585c6e4 Return JSONError for HTTPResponse error 2013-08-03 00:27:58 +00:00
Guillaume J. Charmes ead7eb619e Merge pull request #1384 from crosbymichael/1326-build-without-cache
* Builder: Add no cache for docker build
2013-08-02 14:38:34 -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
Guillaume J. Charmes 3b89d13aaf
Bump to v0.5.1 2013-07-31 10:53:36 -07:00
Victor Vieux 108635582f rebase master 2013-07-31 15:32:08 +00:00
Michael Crosby 3043c26419 Return registy status code in error
Added Details map to the JSONMessage
2013-07-30 23:24:31 +00:00
Victor Vieux 99c27fa0dd Merge branch 'master' into add_last_version-feature 2013-07-30 16:23:06 +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
Victor Vieux c99e8de5a4 Merge branch 'cleanup_signal_handling' of https://github.com/calavera/docker into calavera-cleanup_signal_handling 2013-07-30 11:14:36 +00:00
David Calavera 10e37198aa Keep the loop to allow resizing more than once. 2013-07-29 11:13:59 -07:00
David Calavera c8ec36d1b9 Remove unnecessary signal conditional. 2013-07-29 10:28:41 -07:00