Compare commits

..

3377 Commits

Author SHA1 Message Date
Victor Vieux 3ff845904d set containers comm to true by default 2013-10-30 15:06:28 -07:00
Victor Vieux ec488fa123 fix warning in build 2013-10-30 15:06:01 -07:00
Michael Crosby 1edde0e8a3 Update links and host integration documentation 2013-10-30 13:11:02 -07:00
Victor Vieux 596facd124 fix typos 2013-10-30 13:06:47 -07:00
Victor Vieux 4fd389eee5 fix remove root name and fix error messages 2013-10-30 13:06:43 -07:00
Victor Vieux 6a9fb81c57 improve error message 2013-10-30 13:06:39 -07:00
Victor Vieux 5fb6d6e47c continue build on expose with :, but displays a warning 2013-10-30 13:06:34 -07:00
Michael Crosby 79bf2c2b0e Hotfix: Migrate public mappings after upgrade 2013-10-30 09:02:23 -07:00
Michael Crosby 4f6ce1ba9e Merge pull request #2428 from dotcloud/bump_0.6.5
Bump to version 0.6.5
2013-10-29 14:56:54 -07:00
Michael Crosby da054148dc Bump to version 0.6.5 2013-10-29 14:42:20 -07:00
Michael Crosby 0174951195 Merge branch 'master' into bump_0.6.5 2013-10-29 14:41:47 -07:00
Michael Crosby caa7cf14c0 Merge pull request #2426 from dotcloud/enable_sigproxy_default
Enable sig-proxy by default in run and attach
2013-10-29 14:39:17 -07:00
Victor Vieux 700a71e6b6 stop proxy at one point 2013-10-29 14:29:01 -07:00
Andy Rothfusz 02e0fdee57 Merge pull request #2429 from SvenDowideit/add-more-doc-pointers
tell potential doc updaters and contributors more details
2013-10-29 14:07:12 -07:00
Andy Rothfusz baf23d3c3e Merge pull request #2443 from tlunter/fix_remote_api_doc
Container commit doesn't use a query parameter, uses POST body
2013-10-29 14:04:22 -07:00
Michael Crosby 5b75aea704 Merge pull request #2449 from tianon/remove-stackbrew-remnants
Remove old remnants of stackbrew now that it's a separate project
2013-10-29 14:00:33 -07:00
Michael Crosby d91e145332 Merge pull request #2448 from keeb/fix-dsfg-readme
Fix export clause in readme
2013-10-29 13:44:03 -07:00
Michael Crosby 1384db5e7f Merge pull request #2451 from tianon/clarify-go-requirement
Clarify Go 1.2rc2 / Go 1.1.2 requirements in hack/PACKAGERS.md
2013-10-29 13:41:01 -07:00
Tianon Gravi ff147707b2 Clarify Go 1.2rc2 / Go 1.1.2 requirements in hack/PACKAGERS.md 2013-10-29 13:41:26 -06:00
Tianon Gravi 05430c7170 Merge pull request #2433 from tianon/sqlite-dep
Add SQLite dep to hack/PACKAGERS.md
2013-10-29 12:27:26 -07:00
Tianon Gravi eb79e8c5dd Remove old remnants of stackbrew now that it's a separate project 2013-10-29 13:14:15 -06:00
Nick Stinemates b48fc96579 Fix export clause
This makes our clause DSFG acceptable.
2013-10-29 12:06:48 -07:00
Victor Vieux e0b59ab52b Enable sig-proxy by default in run and attach 2013-10-29 11:18:34 -07:00
Michael Crosby a6a274f312 Merge pull request #2431 from relateiq/2430-links-ip-env
Expose addr, port, proto env variables when linking, Closes #2430
2013-10-29 11:02:46 -07:00
Todd Lunter 4f5790d104 Update all older docs too 2013-10-29 13:57:42 -04:00
Todd Lunter 70c976de03 Doesn't use a query parameter, uses POST body 2013-10-29 10:17:12 -04:00
Julien Barbier 4947f61c20 Updated dotCloud,Inc. to Docker, Inc. 2013-10-29 06:11:36 -07:00
Scott Bessler 1de23f1b81 Expose IP, port, proto as sep. env vars when linking, Closes #2430 2013-10-28 23:02:28 -07:00
Tianon Gravi b283900764 Add SQLite dep to hack/PACKAGERS.md and clean up a few other tiny inconsistencies 2013-10-28 21:57:20 -06:00
Sven Dowideit e47f9984f8 add links to the Dockerfiles as canonical external requirements, add example of building and exposing the docs and simplify the Dockerfile for cacheability 2013-10-29 12:58:58 +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 7e8b2c3836 Make sure only links are removed and not names 2013-10-28 19:19:31 -07:00
Michael Crosby a52e23c5e4 Merge pull request #2425 from dotcloud/links-allow-name
Add -name for docker run
2013-10-28 18:16:06 -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
Andy Rothfusz 76afb6e73d Merge pull request #2421 from dudebout/patch-1
Fixes the flags for nc in example
2013-10-28 17:01:53 -07:00
Victor Vieux c0662488c7 Merge pull request #2422 from dotcloud/links_names_generator
Add name generator for container without -name
2013-10-28 15:34:16 -07:00
Victor Vieux 971cf56d89 add name generator 2013-10-28 15:19:52 -07:00
Nicolas Dudebout 50bb4a1636 Fixes the flags for nc
The `-p` flag for `nc` should not be used with `-l`.
2013-10-28 15:48:18 -04:00
Andy Rothfusz 3c0c75bbf9 Merge pull request #2413 from rutsky/patch-1
Fix typo
2013-10-28 12:08:04 -07:00
Andy Rothfusz 7f95c7aeec Merge pull request #2417 from rutsky/patch-2
fix typo
2013-10-28 12:07:46 -07:00
Vladimir Rutsky 395a24ffd5 fix typo 2013-10-28 09:35:09 +03:00
Vladimir Rutsky 45d94944f3 Fix typo 2013-10-28 02:45:12 +03:00
Victor Vieux 54d3b4dd28 Merge pull request #2400 from dotcloud/remove_newline_debugf
Removes \n from debugf calls
2013-10-25 18:01:19 -07:00
Victor Vieux 8f39f0b57d Removes \\n from debugf calls 2013-10-25 17:50:40 -07:00
Victor Vieux d5c7e92a9a fix docker ps display 2013-10-25 17:36:23 -07:00
Michael Crosby 110b944f45 Merge pull request #2399 from dotcloud/fix_race_stdin_cli
Only pass stdin to hijack when needed
2013-10-25 17:32:36 -07:00
Victor Vieux 13c521526d only pass stdin to hijack when needed 2013-10-25 17:17:33 -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 356af1540f Ensure child containers are started before parents 2013-10-25 15:13:26 -07:00
Michael Crosby 2e6b241dc7 Add default entity and edge to graph on runtime load 2013-10-25 15:13:26 -07:00
Michael Crosby 94e5081bac Move iptable rules outside of create bridge
This allows the user to toggle enabling and
disabling intercontainer communication when
they run the daemon.
2013-10-25 15:13:26 -07:00
Michael Crosby e179a24ad5 Update TestLinkEnv for default port 2013-10-25 15:13:25 -07:00
Victor Vieux da864a845b Remove proto frpm default port 2013-10-25 15:13:25 -07:00
Tianon Gravi 640682d56c Fix "go test -i" to include the proper LDFLAGS and BUILDFLAGS 2013-10-25 15:13:25 -07:00
Victor Vieux 66a159342b update docker port command 2013-10-25 15:13:25 -07:00
Michael Crosby 7c882a8003 Move name parsing logic to GetByName method 2013-10-25 15:13:25 -07:00
Michael Crosby 7d440f70fd Add missing else when checking for linkgraph.db 2013-10-25 15:13:25 -07:00
Solomon Hykes 0c9b319dd0 Hack: fix test and dyntest to correctly use $TESTFLAGS 2013-10-25 15:13:25 -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
Michael Crosby 7072d2aaca Close connection in Get method 2013-10-25 15:13:25 -07:00
Tianon Gravi 21161dbd51 Add dynbinary and dyntest scripts for building/testing a separate static dockerinit binary
After a nice long brainstorming session with @shykes on IRC, we decided on using a SHA1 hash of dockerinit compiled into the dynamic docker binary to ensure that we always use the two in a perfect pair, and never mix and match.
2013-10-25 15:13:25 -07:00
Tianon Gravi cf86e2bb22 Rename all cases of "docker-init" to "dockerinit" for consistency 2013-10-25 15:13:25 -07:00
Tianon Gravi d789750851 Refactor the handling of static-related build flags
This is as discussed with @shykes on IRC
2013-10-25 15:13:25 -07:00
Tianon Gravi fb8d488896 Add a few small consistency tweaks in hack 2013-10-25 15:13:25 -07:00
Victor Vieux dbe7d67c18 fix tests 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 89fb51f606 fix merge issue and gofmt 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 c4923757f1 replace == by HasPrefix for names and improve error message 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
Victor Vieux 99a9783abc fix typo in docs 2013-10-25 15:13:24 -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
Alexander Larsson db99966724 Move SysInit to a submodule
This allows docker-init to not import the main docker
module, which means it won't e.g. pick up any sqlite
dependencies.
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
Alexander Larsson 249f5a65a5 Add a network test
This just tries pinging first 127.0.0.1 and then 8.8.8.8.

We can't ping via a dns name, because libresolv.so is missing
from the test image, so dns resolving doesn't work.
2013-10-25 15:13:24 -07:00
Alexander Larsson 494cd07f72 network: Stop shelling out to /sbin/ip
We have our own netlink version of all the required calls now, so
we can just skip the /sbin/ip dependency.
2013-10-25 15:13:24 -07:00
Alexander Larsson 607c1a520e Use netlink directly instead of /bin/ip in Sysinit
The sysinit code only uses /bin/ip to set a default gateway. This
is pretty easy to do via netlink directly, so we can avoid
the ip dependency.
2013-10-25 15:13:24 -07:00
Alexander Larsson bf61d41d6c Add netlink submodule
This contains various operations that can replace the use of
shelling out to "ip".
2013-10-25 15:13:24 -07:00
Michael Crosby ce965b8c43 Add flag for inter-container communication 2013-10-25 15:13:24 -07:00
Solomon Hykes f7a2f0b937 Typos and FIXMEs 2013-10-25 15:13:24 -07:00
Solomon Hykes 4576d0f802 gograph: fix a bug which caused the unicity of (parent, name) to not be enforced 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
Michael Crosby ff567f8729 Merge pull request #2385 from dotcloud/suppress_even_more_warnings_test
Improve tests again, remove warnings and prevent some mount issues
2013-10-25 15:04:56 -07:00
Jérôme Petazzoni 279791bc74 Merge pull request #2378 from tianon/linkify-github-ids
Linkify @github references in the infrastructure README.md
2013-10-25 11:30:25 -07:00
Andy Rothfusz 1e704a4ddc Merge pull request #2355 from xdissent/patch-1
Typo in host integration docs
2013-10-24 19:05:22 -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
Michael Crosby 217b6070f0 Merge pull request #2383 from jpetazzo/cleanup-errclosedpipe-for-stdin
Ignore ErrClosedPipe for stdin in Container.Attach.
2013-10-24 17:18:28 -07:00
Michael Crosby 36c26a0f0f Merge pull request #2384 from dotcloud/suppress_warning_tty_tests
Change logic for tty resize to avoid warning in tests
2013-10-24 16:59:13 -07:00
Victor Vieux a675e249b1 fix workdir, hostname tests and a bunch on mount issue 2013-10-24 16:57:35 -07:00
Victor Vieux acc2aec988 remove log 2013-10-24 15:13:47 -07:00
Victor Vieux 0e021ed470 swap cat by top to prevent 2 warnings 2013-10-24 15:06:10 -07:00
Jérôme Petazzoni b9eb5e04ae Ignore ErrClosedPipe for stdin in Container.Attach.
But pass `err` in the error channel anyway; don't ignore it anymore.
2013-10-24 15:04:58 -07:00
Victor Vieux 0e44864b66 change logic for tty resize to avoid warning in tests 2013-10-24 14:54:04 -07:00
Michael Crosby e661473bcd Merge pull request #2379 from dotcloud/2377-remove_resize_race-fix
Monitor the tty after starting the container
2013-10-24 12:31:31 -07:00
Tianon Gravi 98c94dd4db Merge pull request #2364 from tianon/sudo-modprobe
Fix install.sh with $sh_c to get sudo/su for modprobe
2013-10-24 11:24:23 -07:00
Victor Vieux 656b66e51b monitor the tty after starting the container 2013-10-24 11:19:06 -07:00
Tianon Gravi c9375d14fc Linkify @github references in the infrastructure README.md 2013-10-24 11:54:06 -06:00
Michael Crosby 489c370fcc Merge pull request #2367 from dotcloud/remove_useless_exit
Remove useless os.Exit() after log.Fatalf
2013-10-24 09:18:45 -07:00
Tianon Gravi aa6c99aff6 Merge pull request #2363 from tianon/mkimage-numeric-owner
Update all the mkimage scripts to use --numeric-owner as a tar argument
2013-10-24 06:42:52 -07:00
Victor Vieux 92384649cf remove useless os.Exit() after log.Fatalf 2013-10-24 00:25:55 -07:00
Victor Vieux c2413889bb Merge pull request #2354 from hamo/refac_parsehost
refactor utils.ParseHost with switch-case, so we can add other proto support easily
2013-10-24 00:22:50 -07:00
Yang Bai e81da876df let utils.ParseHost return err when errors happen 2013-10-24 13:23:02 +08:00
Tianon Gravi f0dbdba5c0 Merge pull request #2263 from tianon/hack-release
Update hack/release.sh process to automatically invoke hack/make.sh and bail on building/testing issues
2013-10-23 15:31:16 -07:00
Tianon Gravi 0324e567ad Fix install.sh with $sh_c to get sudo/su for modprobe 2013-10-23 15:48:30 -06:00
Tianon Gravi ef5cf6c1ec Merge pull request #2226 from tianon/init
Add initial init scripts library and better/safer Ubuntu packaging that works for Debian, too
2013-10-23 14:29:41 -07:00
Tianon Gravi afaddd04f7 Merge pull request #2306 from tianon/fix-ubuntu-install-aufs
Update hack/install.sh with some more Ubuntu-specific installation stuff...
2013-10-23 14:22:55 -07:00
Tianon Gravi 8e43db95f2 Update all the mkimage scripts to use --numeric-owner as a tar argument to properly preserve ownership 2013-10-23 14:08:16 -06:00
Victor Vieux 7a116220e7 Merge pull request #2327 from dotcloud/2325_fix_untag_rmi
fix wrong untag while docker rmi
2013-10-23 10:24:20 -07:00
Victor Vieux 894a68d2ee Merge pull request #2349 from shykes/runtime-cleanup
Runtime: remove unused field kernelVersion
2013-10-23 09:54:00 -07:00
Tianon Gravi dc57d4ca26 Merge pull request #2353 from wrouesnel/mkimage-debootstrap-improvements
mkimage-debootstrap.sh: Add -p option to invoke debootstrap with http_proxy
2013-10-23 09:26:45 -07:00
Will Rouesnel bc8a1081b0 mkimage-debootstrap.sh: Add -p option to invoke debootstrap with http_proxy.
This patch allows debootstrap to be run with the http_proxy environment
variable. This is principally useful when you're using apt-cacher and
apt-cacher-ng locally.
2013-10-24 03:21:10 +11:00
Greg Thornton 33ccd29ae7 Typo in host integration docs 2013-10-23 10:19:12 -05:00
Tianon Gravi 2aaaf90320 Update hack/make/ubuntu to make less ubuntu-centric packages, to fix the issue of deleting the docker group on every upgrade, to use the new init library scripts for upstart and sysvinit, and to include the dependency on iptables 2013-10-23 07:38:12 -06:00
Yang Bai 99f1675566 refactor utils.ParseHost with switch-case, so we can add other proto support easily 2013-10-23 18:29:35 +08:00
Solomon Hykes 7e4d008403 Runtime: remove unused field kernelVersion 2013-10-23 00:44:57 -06: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 8ff7b70c91 Merge pull request #2341 from dotcloud/1327-race_build_verbose-fix
fix race condition in docker build with verbose + cleanup hostIntegration debug
2013-10-22 16:46:36 -07:00
Victor Vieux 01284cbf73 fix status code 2013-10-22 15:39:51 -07:00
Victor Vieux 10e10c9573 fix race condition in docker build with verbose + cleanup hostIntegration debug 2013-10-22 15:01:06 -07:00
Michael Crosby b73065ab33 Merge pull request #2338 from proppy/patch-1
Registry: Fix content-type for PushImageJSONIndex
2013-10-22 14:48:12 -07:00
Johan Euphrosine d93023daa9 registry: fix content-type for PushImageJSONIndex 2013-10-22 11:56:48 -07:00
Andy Rothfusz 81866087fe Merge pull request #2261 from edmund-wagner/master
make copy paste user friendly
2013-10-22 11:31:49 -07:00
Michael Crosby e70030a0c3 Merge pull request #2150 from pnasrat/fix-mnt-subdir-volumes
Fixes issues with mounting subdirectories of /mnt in container.
2013-10-22 11:26:50 -07:00
Andy Rothfusz 3bd45824da Merge pull request #2318 from Tranquility/master
Fix github link in docs
2013-10-22 09:55:33 -07:00
Victor Vieux 13c913d883 Merge pull request #2198 from hamo/hamo/chdir_error
check return value of syscall.Chdir when changing working directory
2013-10-22 09:54:25 -07:00
Tianon Gravi 92beaed066 Merge pull request #2326 from justinforce/commentstring
Set commentstring in Vim syntax plugin
2013-10-22 00:41:34 -07:00
Victor Vieux 6b04913e73 Merge pull request #2307 from gurjeet/sorted_commands_in_help
Place 'top' subcommand's help in proper order.
2013-10-21 18:07:39 -07:00
Victor Vieux 93810b289c fix wrong untag while docker rmi 2013-10-21 17:03:32 -07:00
Justin Force ea59ce60c5 Set commentstring in Vim syntax plugin
By setting the commentstring, you support commenting with plugins like tComment.
Now Vim won't default to incorrect `/* */` comments.
2013-10-21 16:15:10 -07:00
Andy Rothfusz a1fc8e17a7 Clean up level 3 headers. 2013-10-21 14:03:09 -07:00
Ole Reifschneider f903feee03 Fix github link in docs 2013-10-21 22:58:56 +02:00
Andy Rothfusz 26adda6c31 Merge pull request #2303 from metalivedev/2302-fixintro
Fix #2302
2013-10-21 09:39:34 -07:00
Gurjeet Singh 7e09c6332d Place 'top' subcommand's help in proper order. 2013-10-20 02:15:36 -04:00
Tianon Gravi 3b0cbc59ea Update hack/install.sh with some more Ubuntu-specific installation stuff while we're still on AUFS (installing linux-image-extra-$(uname -r) when we can't find AUFS to try to find AUFS) 2013-10-19 23:56:14 -06:00
Andy Rothfusz bba5fd4555 Fix #2302 2013-10-18 18:00:44 -07: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
Andy Rothfusz 8cf0f2dbe5 Update documentation 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
Tianon Gravi 7cf1877098 Add POSIX shell version of host_integration/manager.go in the style of hack/make.sh
Rename host_integration to host-integration for consistency
2013-10-18 16:16:29 -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
Tianon Gravi 4b7c071e9c Merge pull request #2222 from tianon/debootstrap
Renamed and refactored mkimage-debian to mkimage-debootstrap to more clearly reflect its true function
2013-10-18 14:46:14 -07:00
Andy Rothfusz ad7c6bc950 Merge pull request #2281 from metalivedev/cleanupformat
Clean up build warnings. Remove redundant files.
2013-10-18 11:39:46 -07:00
Victor Vieux 2e4ee72201 Merge pull request #2282 from shykes/fix-tests
Tests: Cleanup the test suite
2013-10-18 11:31:13 -07:00
Tianon Gravi 4870265a9f Add "vendor/pkg/" to .gitignore now that we "go test -i" 2013-10-18 12:18:13 -06:00
Roger Peppe 43fd85eb8f Merge remote-tracking branch 'upstream/master'
Conflicts:
	commands.go
2013-10-18 09:22:20 +01:00
Solomon Hykes b629810fe0 hack: encode the name of the current test in temporary directories, for easier tracking
Conflicts:
	utils_test.go
2013-10-18 07:29:07 +00:00
Solomon Hykes 07d9e4353b Increase readbility of unit tests by using mkRuntime everywhere 2013-10-18 07:20:39 +00:00
Tianon Gravi ac5bc86771 Merge pull request #1 from jpetazzo/cherry-on-top-of-hack-release
Cherry on top of hack release
2013-10-17 23:21:41 -07:00
Jérôme Petazzoni 85956c70b5 Change bundle order, and fix shell array expansion.
I believe that it is helpful to build the binary first. That way,
if you interrupt the tests, you still get a binary to play with.
If you run the tests first and interrupt them, no binary for you!

Also, the second part of this commit is an undeniable proof that
Bash array syntax is nothing else than an elaborate troll by Bash
authors.
2013-10-17 23:20:18 -07:00
Jérôme Petazzoni 8c38c30985 Remove spurious messages, and use proper args expansion.
Also, display some (hopefully helpful) message when no command was given.
2013-10-17 23:19:36 -07:00
Tianon Gravi 89a2c8e2cd Merge pull request #2283 from tmc/master
Make mkimage-arch.sh a little more clear
2013-10-17 23:05:01 -07:00
Travis Cline f34a62ea19 Use heredoc to make expect script more clear 2013-10-18 00:35:12 -05:00
Jérôme Petazzoni 255b6aadfa Work around an exotic bug affecting Docker-in-Docker + systemd. 2013-10-17 20:42:11 -07:00
Solomon Hykes 5c175357aa Hack: fix tests which didn't cleanup properly 2013-10-18 02:13:36 +00:00
Solomon Hykes 240d5b3fa1 Hack: don't run integration tests in /var/lib/docker/unit-tests; add missing cleanups in a few tests 2013-10-18 02:13:36 +00:00
Andy Rothfusz 689bcd1dc3 Clean up build warnings. Remove redundant files. 2013-10-17 17:57:01 -07:00
Victor Vieux 8bce284496 clean split between errors and output. JSON output always valid 2013-10-17 23:40:43 +00:00
Jérôme Petazzoni 95ccb78aa7 Merge pull request #2253 from jpetazzo/infrastructure-docs
Try a different presentation of infrastructure documentation.
2013-10-17 16:17:32 -07:00
Tianon Gravi 83a2e92d47 Update hack/release.sh process to automatically invoke hack/make.sh and bail on building/testing issues 2013-10-17 16:49:35 -06:00
Jérôme Petazzoni d401e9d3ac Add Stackbrew. 2013-10-17 14:11:10 -07:00
Victor Vieux f248a8e13c Update CHANGELOG.md 2013-10-17 11:27:44 -07:00
Victor Vieux 47cc6c8081 Update CHANGELOG.md 2013-10-17 11:26:17 -07:00
Tianon Gravi c405d53b6e Add initial init scripts library, including systemd, sysvinit, upstart, and openrc 2013-10-17 12:03:49 -06:00
Edmund Wagner bc39ac71e6 c&p improvement for 13.04
first line killed sources list
2013-10-17 10:07:12 +02:00
Edmund Wagner 2110b3cca8 make copy paste user friendly
copying only the first line killed my sources.list file
2013-10-17 09:31:35 +02:00
Michael Crosby 414795856a Merge branch 'release' 2013-10-16 18:20:04 -07:00
Michael Crosby 2f74b1c84b Merge pull request #2255 from dotcloud/bump_0.6.4
Bump to 0.6.4
2013-10-16 17:59:45 -07:00
Michael Crosby e8da76605f Bump version to 0.6.4 2013-10-16 17:50:08 -07:00
Michael Crosby f16e60665b Merge branch 'master' into bump_0.6.4 2013-10-16 17:48:17 -07:00
Michael Crosby 3ba9893786 Merge pull request #2242 from jpetazzo/remove-spurious-errors-and-errclosedpipe
Fix error/debug messages in Container.Attach and recover from ErrClosedPipe
2013-10-16 17:27:23 -07:00
Jérôme Petazzoni 7b1c6ccabd Try a different presentation of infrastructure documentation. 2013-10-16 17:11:21 -07:00
Guillaume J. Charmes 6ee2964a4f Merge pull request #2256 from dotcloud/discard_errno_0_errors
- Runtime: discard errno = 0 errors
2013-10-16 16:22:03 -07:00
Victor Vieux 49c62879b8 discard errno = 0 errors 2013-10-16 23:05:50 +00:00
Michael Crosby 34745ee0f4 Merge pull request #2246 from dotcloud/clean_when_start_fail
Add cleanup when container.Start fails
2013-10-16 15:06:08 -07:00
Victor Vieux d21bd5b964 Merge pull request #2251 from dotcloud/skip_autoremove_test
skip auto-remove test for now
2013-10-16 14:59:08 -07:00
Michael Crosby 82220ea2ad Merge pull request #2249 from jpetazzo/cleanup-errclosing-in-proxy
Catch errClosing error when TCP and UDP proxies are terminated.
2013-10-16 14:51:43 -07:00
Victor Vieux 655b16c712 skip auto-remove test for now 2013-10-16 21:47:20 +00:00
Michael Crosby eb2d0d4bf5 Merge pull request #2250 from dotcloud/revert-07-doc-changes
Revert "Fix #2115 Clean AUFS references. Also fixes some links to client...
2013-10-16 14:44:53 -07:00
Jérôme Petazzoni cc851dbb3f Catch errClosing error when TCP and UDP proxies are terminated. 2013-10-16 14:43:20 -07:00
Victor Vieux e40fd1e3e1 fix panic 2013-10-16 21:39:03 +00:00
Michael Crosby dab84f7e8b Revert "Fix #2115 Clean AUFS references. Also fixes some links to client libraries and mongo example."
This reverts commit f4c17a202b.
2013-10-16 14:38:24 -07:00
Daniel Mizyrycki 7df8ec2093 Merge pull request #2195 from mzdaniel/report
Add aggregated docker-ci email report
2013-10-16 14:29:24 -07:00
Daniel Mizyrycki a2ffa637ce testing infrastructure, PR #2195: Add aggregated docker-ci email report 2013-10-16 13:30:15 -07:00
Guillaume J. Charmes ed6ca109bf Refactor container.Start() 2013-10-16 13:12:56 -07:00
Victor Vieux 6e48b73955 Merge pull request #2247 from dotcloud/improve_tests_error_messages
Tests: Remove a few errors
2013-10-16 12:50:15 -07:00
Victor Vieux 664acd2971 Add clean if start fail 2013-10-16 19:48:24 +00: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
Victor Vieux 104a86936a api.go:108 Error parsing media type: error: mime: no media type
fix
2013-10-16 19:32:03 +00:00
Victor Vieux df697b4318 use httpError in a separate test 2013-10-16 19:23:47 +00:00
Tianon Gravi 27fc01271e Merge pull request #2219 from tianon/completion
Reorganize contributed completion scripts to add zsh completion
2013-10-16 11:40:56 -07:00
Tianon Gravi 97ab118fbb Merge pull request #2220 from tianon/vim
Add vim syntax highlighting for Dockerfiles from @honza
2013-10-16 11:40:42 -07:00
Jérôme Petazzoni fc659b68e4 Fix error/debug messages in Container.Attach and recover from ErrClosedPipe conditions. 2013-10-16 11:35:45 -07:00
Guillaume J. Charmes 99f6b43f4f Merge pull request #2243 from jpetazzo/comments-stdcopy
Add better comments to utils/stdcopy.go.
2013-10-16 11:17:15 -07:00
Victor Vieux 2b92aa71f9 Merge pull request #2244 from dotcloud/add_cleanup_leftover_container_tests
Tests: add cleanup to remove leftover containers
2013-10-16 11:09:48 -07:00
Victor Vieux f854529ae8 add cleanupin tests to remove leftover containers 2013-10-16 18:06:37 +00:00
Jérôme Petazzoni e32debcf5f Add better comments to utils/stdcopy.go. 2013-10-16 10:58:53 -07:00
Andy Rothfusz 0e08e1d695 Merge pull request #2236 from SvenDowideit/2209-comments-doc
#2209 - add the example @tianon gave to elaborate on the Comment docume...
2013-10-16 10:51:15 -07:00
Andy Rothfusz 65b62307c3 Merge pull request #2231 from metalivedev/1919-docreleaseinfo
Fix #1919 document how to edit and release docs.
2013-10-16 10:45:01 -07:00
Andy Rothfusz 03e5d94b12 Merge pull request #2090 from kencochrane/master
added initial draft of the Docker infrastructure doc
2013-10-16 10:44:22 -07:00
Tianon Gravi 0ca533ca35 Merge pull request #2233 from tmc/master
Add mkimage-arch.sh
2013-10-15 19:27:45 -07:00
Travis Cline d94a027da6 Add mkimage-arch.sh 2013-10-16 02:26:15 +00:00
Sven Dowideit 7250f94874 #2209 - add the example @tianon gave to elaborate on the Comment documentation 2013-10-16 11:12:47 +10: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
Victor Vieux adb48ef319 Merge pull request #2235 from dotcloud/update_dockerfile
Update Dockerfile test comment
2013-10-15 17:32:48 -07:00
Victor Vieux ee7d9b0bde Update Dockerfile test comment 2013-10-16 00:31:34 +00:00
Victor Vieux 2f4526d5c4 Merge pull request #2221 from flavio/fix_broken_tests
Fixed broken tests
2013-10-15 17:26:19 -07:00
Victor Vieux 261285c2c2 Merge pull request #2232 from shykes/error-should-be-debug
Remove error messages which are not actually errors
2013-10-15 17:12:51 -07:00
Solomon Hykes cbc49d7d76 Remove error messages which are not actually errors 2013-10-15 23:12:27 +00:00
Solomon Hykes 4dc90405e3 Merge pull request #2230 from shykes/hack-select-test
hack: only run certain tests with TESTFLAGS='-run TestName' make.sh
2013-10-15 15:58:54 -07:00
Solomon Hykes b7abe9dab5 hack: only run certain tests with TESTFLAGS='-run TestName' make.sh 2013-10-15 22:57:40 +00:00
Andy Rothfusz cd455ca6fa Fix #1919 document how to edit and release docs. 2013-10-15 15:52:21 -07:00
Flavio Castelli ca56b35e53 Fixed broken tests
Some tests failed because the `auplink` binary was not found inside of the
"docker" container.
2013-10-15 11:44:56 +02:00
Tianon Gravi 095aab9d97 Refactor mkimage-debootstrap.sh to be much more full-featured
This includes the following:
- options to control certain parameters
- an option specifically for creating tarballs directly, esp. for dockerbrew
- the addition of the updates and security repositories for Debian images
- the addition of the universe, updates, and security repositories for Ubuntu images
- more correct tagging of Debian images
- tagging of Ubuntu image versions (12.04, 12.10, etc) and latest tag for LTS
2013-10-15 03:44:03 -06:00
Tianon Gravi ace059e409 Add vim syntax highlighting for Dockerfiles from @honza
See https://github.com/honza/dockerfile.vim
See also https://twitter.com/_honza/status/390046317579620352
2013-10-15 03:35:13 -06:00
Tianon Gravi 9da2b3590e Add zsh completion from @felixr with permission
See https://github.com/felixr/docker-zsh-completion for the original.
See also https://github.com/dotcloud/docker/issues/2202#issuecomment-26313287

Fixes #2202
2013-10-15 03:04:06 -06:00
Tianon Gravi e99ab1df97 Move contrib/docker.bash to contrib/completion/bash/docker for better organization 2013-10-15 03:02:31 -06:00
Tianon Gravi 4967f9f19c Rename mkimage-debian.sh to mkimage-debootstrap.sh to more clearly reflect its true function 2013-10-15 02:26:10 -06:00
Solomon Hykes fde157425c Merge pull request #2218 from tianon/ksid
Remove @KSid from contrib maintainers for now
2013-10-15 00:13:58 -07:00
Tianon Gravi a0e5657cb6 Remove @KSid from contrib maintainers for now
His availability has been very limited, so I'll take over completely for the short term until he can find more time to help out.
2013-10-15 00:58:34 -06:00
Daniel Mizyrycki f4a98b4598 Merge pull request #2211 from mzdaniel/2190-docker-ci
Prevent docker-ci to test closing PRs
2013-10-14 14:12:23 -07:00
Daniel Mizyrycki 53a07d5475 Prevent docker-ci to test closing PRs 2013-10-14 14:00:06 -07:00
Andy Rothfusz 93b258413f Merge pull request #2160 from iffy/patch-1
Minor updates to postgresql_service.rst
2013-10-14 11:59:57 -07:00
Andy Rothfusz c0bfb75e5f Merge pull request #2142 from SvenDowideit/patch-1
tell the new developer how they can replace the real docker binary with ...
2013-10-14 11:55:42 -07:00
Yang Bai 1043055b10 check return value of syscall.Chdir when changing working directory 2013-10-14 15:27:38 +08:00
Daniel Mizyrycki 620bc5b9e1 Merge pull request #1823 from dotcloud/1766-nightly-release
testing, issue #1766: Add nightly release to docker-ci
2013-10-11 17:38:06 -07:00
Daniel Mizyrycki 6d6097cddf Merge pull request #1813 from doubleyou/patch-1
Improve network performance for VirtualBox
2013-10-11 16:23:19 -07:00
Daniel Mizyrycki 42277d0329 Merge pull request #2178 from tianon/vagrant-docker-group
Add vagrant user to the docker group
2013-10-11 15:10:50 -07:00
Tianon Gravi d62df6b2b5 Add vagrant user to the docker group 2013-10-11 11:00:04 -06:00
Michael Crosby 97779ff7cf Merge pull request #2118 from karlgrz/936-enhance-logging
Add utils.Errorf for error logging
2013-10-11 08:51:37 -07:00
Michael Crosby 9afa48a92f Merge pull request #2169 from dotcloud/remove-deprecated-packaging
Remove deprecated packaging directory
2013-10-11 08:44:34 -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
Solomon Hykes f15cd71bb8 Merge pull request #2037 from tianon/install-script-revamp
Revamp install.sh to be usable by more people, and to use official install methods whenever possible (apt repo, portage tree, etc.)
2013-10-10 23:56:13 -07:00
Tianon Gravi 94bf5b0011 Revamp install.sh to be usable by more people, and to use official install methods whenever possible (apt repo, portage tree, etc.), thus making it an official script and moving it to hack/ 2013-10-11 00:53:15 -06:00
Daniel Mizyrycki d542318d63 testing infrastructure, issue #1766: Dockerize deployment of docker-ci 2013-10-10 18:29:10 -07:00
Daniel Mizyrycki 6e3068700f testing infrastructure, issue #1766: Temporarily install docker with proper apparmor handling 2013-10-10 18:29:10 -07:00
Daniel Mizyrycki fac190959f testing, issue #1766: Upgrade tooling for Docker nightly release 2013-10-10 18:29:10 -07:00
Daniel Mizyrycki 1dcdc3deb7 testing, issue #1766: Add nightly release to docker-ci 2013-10-10 18:29:10 -07:00
Solomon Hykes ee256ce6bf Merge pull request #2038 from tianon/mkimage-debian-fixes
Fix contrib/mkimage-debian.sh apt caching prevention
2013-10-10 17:59:17 -07:00
Solomon Hykes 5fe699f813 Merge pull request #2166 from pnasrat/document-approval
Clarify LGTM process to contributors.
2013-10-10 17:55:32 -07:00
Solomon Hykes 7561e2570c Merge pull request #2159 from nathankleyn/fix-references-to-param-names
Small fixes to parameter names in docs for ADD command.
2013-10-10 17:53:57 -07:00
Guillaume J. Charmes 640ca68e4f Merge pull request #2128 from titanous/update-authors
Update AUTHORS
2013-10-10 16:40:33 -07:00
Guillaume J. Charmes f9b9dfc82d Merge pull request #2164 from pnasrat/add-finished-time
* Runtime: Record termination time in state.
2013-10-10 16:29:07 -07:00
Guillaume J. Charmes c978f0fa5c Merge pull request #2165 from jrydberg/master
- Registry: Use correct auth config when logging in.
2013-10-10 16:28:46 -07:00
Sven Dowideit d91bf33df3 tell the new developer how they can replace the real docker binary with the one they've been hacking on (#2142) 2013-10-11 08:47:32 +10:00
Paul Nasrat 310a174260 Clarify LGTM process to contributors. 2013-10-10 18:32:33 -04:00
Paul Nasrat 2eb404ab14 Record termination time in state.
Supercedes pull #1946
2013-10-10 14:47:25 -04:00
Ken Cochrane 60e426938e Merge pull request #2155 from jdubois/patch-1
- Documentation: Corrected error in the package name
2013-10-10 11:19:22 -07:00
Matt Haggard 9041d6a47b Minor updates to postgresql_service.rst
I've added the steps that were missing/wrong for me when I went through this just now.
2013-10-10 10:23:24 -06:00
Nathan Kleyn 8abd328f53 Small fixes to parameter names in docs for ADD command. 2013-10-10 12:14:18 +01:00
Solomon Hykes ae780fb5ea Remove deprecated packaging directory (distro-specific packaging is now managed downstream by their respective package maintainers) 2013-10-10 03:54:10 -07:00
Julien Dubois 152037f011 Corrected error in the package name 2013-10-10 10:10:33 +02:00
Andy Rothfusz 0367032bd1 Merge pull request #2144 from shamrin/patch-5
document what `vagrant up` is actually doing
2013-10-09 17:42:37 -07:00
Andy Rothfusz edca9f7e9c Merge pull request #2139 from metalivedev/2115-AUFScleanup
Fix #2115 Clean AUFS references.
2013-10-09 17:35:05 -07:00
Guillaume J. Charmes e19cc1e843 Merge pull request #2125 from dotcloud/2099_rm-v_fix
- Runtime: fix `docker rm` with volumes
2013-10-09 16:01:51 -07:00
Guillaume J. Charmes feabce3bcc Merge pull request #2119 from SvenDowideit/2117-hardcoded-tmp-dir
use empty string so TempDir uses the OS's temp dir automatically (Closes...
2013-10-09 16:00:40 -07:00
Michael Crosby ded74b0bb3 Merge pull request #2133 from dotcloud/improve_tests
Make sure to close the network allocators
2013-10-09 15:45:16 -07:00
Guillaume J. Charmes ffee5faae8 Merge pull request #2145 from dotcloud/remove-panic-test
* Runtime: replace panic by log.Fatal in tests
2013-10-09 15:37:08 -07:00
Paul Nasrat aa3697520a Fixes issues with mounting subdirectories of /mnt in container.
Tested with
mkdir /mnt/data
docker run -v /mnt/data:/mnt/data  -t ubuntu:12.10 touch /mnt/data/bar

Expected /mnt/data/bar on host.
2013-10-09 16:40:46 -04:00
Andy Rothfusz c1bb33ea4d Merge pull request #2114 from metalivedev/2113-searchbump
Fix #2113 improve doc search results
2013-10-09 12:24:33 -07:00
Andy Rothfusz 6545e53803 Clean up javascript comment. 2013-10-09 12:22:14 -07:00
Victor Vieux d30806590c Merge pull request #2127 from titanous/close-body
Fix some error cases where a HTTP body might not be closed
2013-10-09 06:52:03 -07:00
Victor Vieux 823174de4d replace panic by log.Fatal in tests 2013-10-09 13:47:49 +00:00
Tianon Gravi d5f9160441 Merge pull request #1956 from tianon/bash-completion
Add proper bash completion for "docker push"
2013-10-09 05:47:55 -07:00
Alexey Shamrin 37df1d92d8 document what vagrant up is actually doing
* don't mention outdated PPA that Vagrantfile doesn't use
* point to official Ubuntu installation instructions that Vagrant appears to be following; should be future proof
2013-10-09 15:05:09 +04:00
Jonathan Rudenberg dabac81824 Update AUTHORS 2013-10-08 23:51:38 -04:00
Guillaume J. Charmes bb62c281f5 Merge pull request #2130 from tianon/swap-contrib-maintainers
Swap contrib MAINTAINERS
2013-10-08 17:57:52 -07:00
Andy Rothfusz 3565bf8d00 Merge pull request #2134 from tianon/contributing
Add devenvironment link to CONTRIBUTING.md
2013-10-08 17:36:56 -07:00
Andy Rothfusz f4c17a202b Fix #2115 Clean AUFS references. Also fixes some links to client libraries and mongo example. 2013-10-08 17:33:19 -07:00
Tianon Gravi 9a4b0b9823 Add devenvironment link to CONTRIBUTING.md 2013-10-08 16:48:19 -06:00
Guillaume J. Charmes 9107565d06 Make sure to close the network allocators 2013-10-08 15:42:02 -07:00
Tianon Gravi 4fda3314d8 Swap contrib MAINTAINERS 2013-10-08 15:15:58 -06:00
Jonathan Rudenberg e906485b07 Fix some error cases where a HTTP body might not be closed
Refs #2126
2013-10-08 15:35:00 -04:00
Victor Vieux 1daf242c8b fix rm -v 2013-10-08 16:35:47 +00:00
Johan Rydberg 967010ae8c Use correct auth config when logging in. 2013-10-08 06:46:29 +02:00
Sven Dowideit d03022b9ca use empty string so TempDir uses the OS's temp dir automatically (Closes #2117) 2013-10-08 13:24:20 +10:00
Andy Rothfusz 6d67ac2a1b Insert popularity and boost docs results. 2013-10-07 17:51:07 -07:00
Solomon Hykes 2d425af1b1 Merge pull request #2103 from tianon/clean-out-fixme
Clean out a few outdated FIXME items
2013-10-07 15:19:01 -07:00
Andy Rothfusz ed19693f50 Merge pull request #2106 from mastahyeti/api_1.5_docs_whitespace
Cleanup whitespace in API 1.5 docs
2013-10-07 13:23:55 -07:00
Tianon Gravi ee27444098 Fix contrib/mkimage-debian.sh apt caching prevention 2013-10-07 13:41:10 -06:00
Andy Rothfusz 194c1dbbd8 Merge pull request #2109 from shamrin/patch-4
[docs] use angle brackets in MAINTAINER example email
2013-10-07 12:18:44 -07:00
Alexey Shamrin a9eac7eab4 [docs] use angle brackets in MAINTAINER example email 2013-10-07 20:29:54 +04:00
Ben Toews 7c28683f08 Cleanup whitespace in API 1.5 docs
remove whitespace on blank lines
2013-10-06 19:52:18 -06:00
Daniel Mizyrycki c18e849451 Merge pull request #2061 from dotcloud/1948-test-detach
testing, issue #1948: Increase TestRunDetach timeout
2013-10-06 13:26:44 -07:00
Tianon Gravi a665517151 Clean out a few outdated FIXME items 2013-10-06 13:55:26 -06:00
Ken Cochrane 0d3c899528 added initial draft of the Docker infrastructure doc 2013-10-04 15:12:40 -04:00
Andy Rothfusz 863eebe7bd Merge pull request #2084 from makeusabrew/patch-1
Fix help text for -v option
2013-10-04 09:29:56 -07:00
Nick Payne 3c5350ba92 Fix help text for -v option 2013-10-04 10:26:57 +01:00
Tianon Gravi c52c95f97f Merge pull request #1876 from asbjornenge/master
Added Dockerfile.tmLanguage to contrib
2013-10-03 23:52:37 -07:00
Asbjørn Enge 85a5139665 Added Dockerfile.tmLanguage to contrib 2013-10-04 08:45:15 +02:00
Michael Crosby ad4b09cdb8 Merge pull request #1832 from dotcloud/26-default_r_flag
Autorestart containers by default
2013-10-03 15:59:58 -07:00
Victor Vieux e594c788e4 keep -r, but default true 2013-10-03 22:42:35 +00:00
Victor Vieux f84dc1e908 add missing error check 2013-10-03 22:33:00 +00:00
Michael Crosby 826aaa0e9b Merge pull request #1990 from modcloth-labs/more-tests-for-auth-registry-resolution
Adding more tests around `auth.ResolveAuthConfig`
2013-10-03 14:45:02 -07:00
Victor Vieux 1328be7c29 Add test 2013-10-03 15:21:14 +00:00
Andy Rothfusz ff4f32d58f Fix #2017 Merge branch '2017-api-details' 2013-10-02 18:20:44 -07:00
Andy Rothfusz 462ac1efcf Merge branch 'hint-api-details' of git://github.com/cdunklau/docker into 2017-api-details
Conflicts:
	docs/sources/api/docker_remote_api.rst
2013-10-02 18:18:46 -07:00
Solomon Hykes 1332f400f7 Merge pull request #2015 from dsissitka/1927
Configured FPM to make /etc/init/docker.conf a config file.
2013-10-02 18:18:16 -07:00
Solomon Hykes a292c04ddb Merge pull request #2069 from philips/add-xz-to-runtime-dependencies
fix(hack/PACKAGERS): add xz utils as a runtime dep
2013-10-02 17:37:56 -07:00
Andy Rothfusz 37c4513cf9 Merge pull request #2060 from mastahyeti/patch-1
Add `apt-get install curl` to Ubuntu docs
2013-10-02 16:46:00 -07:00
Andy Rothfusz b584c21ca4 Merge pull request #2063 from dhrp/doc-template-fix
Doc template fix
2013-10-02 16:31:47 -07:00
Andy Rothfusz c92507341d Merge pull request #2073 from tianon/gentoo-no-more-1422-hack
Remove Gentoo install notes about #1422 workaround
2013-10-02 16:24:11 -07:00
Andy Rothfusz 9f0feaa2e1 Merge pull request #2065 from kyleconroy/fix_ping_endpoint
Fix Ping endpoint documentation
2013-10-02 16:22:49 -07:00
Ben Toews 0f830aa431 Update ubuntu docs to use wget instead of curl
Ubuntu doesn't come with curl.

wget instead of curl

nicer wget syntax

remove /dev/null
2013-10-02 16:27:34 -06:00
Tianon Gravi 5f05cb4817 Remove Gentoo install notes about #1422 workaround 2013-10-02 16:06:22 -06:00
Michael Crosby 4778039dd2 Merge pull request #2066 from tianon/vendor-bump-kr-pty
Bump vendor kr/pty to commit 3b1f6487b (syscall.O_NOCTTY)
2013-10-02 14:44:07 -07:00
Guillaume J. Charmes b180770b1d Merge pull request #2014 from alexlarsson/allow_set_file_cap
* Runtime: lxc: Allow set_file_cap capability in container
2013-10-02 14:38:50 -07:00
Brandon Philips 4f5c2cbccc fix(hack/PACKAGERS): add xz utils as a runtime dep 2013-10-02 12:06:19 -07:00
Andy Rothfusz c3acd9bece Merge pull request #2047 from Thermionix/patch-1
Update archlinux.rst
2013-10-02 10:57:48 -07:00
Tianon Gravi cb21a40490 Bump vendor kr/pty to commit 3b1f6487b (syscall.O_NOCTTY) 2013-10-01 19:48:50 -06:00
Thatcher Peskens 5025b4d094 Cleanup 2013-10-01 16:32:56 -07:00
Thatcher Peskens 509e25cf04 Add/modified the canonical link to work with all /index/ links. Added style for "danger' 2013-10-01 16:26:14 -07:00
Daniel Mizyrycki 135c1fce90 testing, issue #1948: Increase TestAttachDetach and TestRunDetach timeout 2013-10-01 15:59:52 -07:00
Kyle Conroy d517fd3d77 Fix Ping endpoint documentation 2013-10-01 15:49:32 -07:00
Michael Crosby b4e1b8d2e2 Merge pull request #2058 from marcusramberg/patch-1
Fix ironic typo in changelog
2013-10-01 09:58:32 -07:00
Marcus Ramberg 45bd52d472 Fix ironic typo in changelog 2013-10-01 18:16:10 +02:00
Andy Rothfusz 534a991cff fix logo path 2013-09-30 16:54:04 -07:00
Solomon Hykes 23015fa14d Merge pull request #1994 from metalivedev/1993-legalcontext
Fix #1993: add explanation for export restrictions
2013-09-30 16:33:46 -07:00
Thermionix fb46d911c2 Update archlinux.rst 2013-10-01 09:33:12 +10:00
Tianon Gravi 85b776995c Merge pull request #2051 from tianon/hack-dockerfile-refactor
Add cleanup/refactor portion of #2010 for hack and Dockerfile updates
2013-09-30 16:29:32 -07:00
Thatcher fa44555fb4 Merge pull request #2035 from dhrp/style-revamp
Changes to a new style for the docs. Includes version switcher.
2013-09-30 15:51:43 -07:00
Andy Rothfusz 3e7c50e8a1 Merge pull request #2033 from metalivedev/1969-cherrypick-fixcommitformat
Fix #1969 formatting, add information about multiline json
2013-09-30 14:55:11 -07:00
Tianon Gravi ccefe47897 Add cleanup/refactor portion of #2010 for hack and Dockerfile updates 2013-09-30 13:57:30 -06:00
Tianon Gravi ff85031980 Merge pull request #2039 from tianon/mkimage-centos
Add contrib/mkimage-centos.sh back (from #1621), and associated documentation link
2013-09-30 10:51:06 -07:00
Guillaume J. Charmes 017ecefd66 Merge pull request #2046 from dotcloud/2030-dockercfg_panic_err-fix
- Runtime: fix panic with wrong dockercfg file
2013-09-30 10:02:12 -07:00
Thermionix 88f710f0e7 Update archlinux.rst
The /etc/sysctl.conf file is deprecated
https://www.archlinux.org/news/deprecation-of-etcsysctlconf/
2013-09-30 22:44:09 +10:00
Victor Vieux 6496059154 fix panic with wrong dockercfg file 2013-09-30 11:07:32 +00:00
Victor Vieux bcce3cbdd1 Merge pull request #1995 from dotcloud/fix_attach_2
Fix the attach behavior with -i
2013-09-30 03:29:19 -07:00
Victor Vieux bbf644ed62 Merge pull request #2025 from dotcloud/2020_add_dockercfg_doc
add .dockercfg doc
2013-09-30 03:21:46 -07:00
Tianon Gravi d89ce09a76 Add contrib/mkimage-centos.sh back (from #1621), and associated documentation link 2013-09-28 07:54:34 -06:00
Thatcher Peskens e3e041b6bf Changes to a new style for the docs. Includes version switcher.
* added link to edit on GitHub
* Changed image source on homepage
* Made some changes to the structure, added the ability to have l3 navigation. Added warning, note and other styles.
* Fixed an image link, removed the .. :content: links because they were quicky and didn't look good, added pagelinks to current page of other versions.
* Moved the remote client api's to their own doc
2013-09-27 19:54:52 -07:00
Andy Rothfusz 0a35b1fb36 Added more context. 2013-09-27 19:07:12 -07:00
Andy Rothfusz 3894add8a9 Merge pull request #2034 from metalivedev/1969-cherrypick-fixcommitformat
Fix #1969 formatting, add information about multiline json
2013-09-27 18:19:55 -07:00
Andy Rothfusz 74d54b9b2e Fix #1969 formatting, add information about multiline json 2013-09-27 18:16:00 -07:00
Michael Crosby 31fd11860b Merge pull request #2032 from dotcloud/move-rm-to-client
Move run -rm to the cli only
2013-09-27 17:19:01 -07:00
Daniel Mizyrycki b081a740b3 Merge pull request #2006 from jo-m/master
Enable SSH Agent forwarding in Vagrant VM
2013-09-27 12:07:44 -07:00
Michael Crosby db869ecce5 Merge pull request #1589 from unclejack/479-add_rm_support_to_docker_run
Add -rm to docker run for removing a container on exit
2013-09-27 11:45:32 -07:00
Guillaume J. Charmes 537149829a Fix the attach behavior with -i 2013-09-27 11:10:55 -07:00
Andy Rothfusz ba10e28927 Merge pull request #2009 from kyleconroy/master
Improve registry and index REST API documentation
2013-09-27 10:56:21 -07:00
Victor Vieux f4855a7cf0 add .dockercfg doc 2013-09-27 18:19:17 +02:00
unclejack 22e7e107ad automatically remove container via -rm
add AutoRemove to HostConfig
add -rm flag to docker run
add TestRunAutoRemove to test -rm
docs: add -rm to commandline/command/run
add hostConfig to container monitor
make monitor destroy the container via -rm

This adds support for automatically removing a container after it
exits. The removal of the container is handled on the server side.
2013-09-27 17:43:12 +03:00
Colin Dunklau edd90d46c7 Clearly point at detailed docs 2013-09-27 08:32:55 -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
Guillaume J. Charmes cb18a6e1b9 Update docs + fix endian issue 2013-09-26 17:36:21 -07:00
Kyle Conroy ce05083d4b Fix copypasta errors 2013-09-26 14:57:02 -07:00
Michael Crosby 723de87681 Move run -rm to the cli only 2013-09-26 14:52:37 -07:00
David Sissitka c22e377a6d Used tabs for alignment when I should've used spaces. Fixed. 2013-09-26 13:56:59 -07:00
Colin Dunklau 3f0d0075f8 Hint for Remote API doc details in header links 2013-09-26 15:30:26 -05:00
David Sissitka f8c9f11f06 Configured FPM to make /etc/init/docker.conf a config file. 2013-09-26 12:52:43 -07:00
Alexander Larsson 80319add55 lxc: Allow set_file_cap capability in container
This means you're able to set the bits for capabilities on files
inside the container. This is needed for e.g. many fedora packages
as they use finegrained capabilities rather than setuid binaries.

This is safe as we're not adding capabilities really, since the
container is already allowed to create setuid binaries. Setuid
binaries are strictly more powerful that any capabilities (as root implies
all capabilities).

This doesn't mean the container can *gain* capabilities that it
doesn't already have though. The actual set of caps are strictly
decreasing.
2013-09-26 21:41:45 +02:00
Kyle Conroy 818ec10da3 Fix Authorization headers 2013-09-26 01:19:49 -07:00
Kyle Conroy 34e28ccc88 Remove smart quotes. Add the X-Docker-Token header
Also fix the /layer endpoint, which had incorrect information
2013-09-26 01:15:36 -07:00
Kyle Conroy 792403f2dc Add the X-Docker-Registry header and /v1/_ping endpoint 2013-09-26 00:16:15 -07:00
Jonathan Mueller 8f5c33dc1f Enable SSH Agent forwarding in Vagrant VM, so one is able to clone repos from private git repos etc. 2013-09-25 22:57:04 +02:00
Andy Rothfusz 06c1f000e8 Merge pull request #2000 from tianon/deprecated-docker-latest-tgz
Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3
2013-09-25 13:47:48 -07:00
Andy Rothfusz 00b3acb8ab Merge pull request #2001 from tianon/gentoo-tree
Update Gentoo installation documentation now that we're in the portage tree proper
2013-09-25 13:45:51 -07:00
Victor Vieux 420ba9c85a Merge pull request #2004 from kencochrane/master
fix the error message so it is the same as the regex issue #1999
2013-09-25 09:46:15 -07:00
Ken Cochrane 0f829bf5cf fix the error message so it is the same as the regex issue #1999 2013-09-25 11:33:09 -04:00
Victor Vieux 1363de0934 Merge pull request #1989 from alexlarsson/setsid
Container: Always create a new session for the container
2013-09-25 07:40:51 -07:00
Tianon Gravi d06116d2e8 Update Gentoo installation documentation now that we're in the portage tree proper
We're officially a first-class Gentoo citizen now, which is very exciting.  Many thanks to @gregkh for helping us get here.

I started just adapting sections of language in this document, and realized several bits needed to just be rewritten entirely to be more clear.
2013-09-24 23:26:36 -06:00
Tianon Gravi 595210a370 Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3 2013-09-24 21:25:45 -06:00
Michael Crosby c9b916b293 Update VERSION to 0.6.3-dev 2013-09-24 19:54:13 -07:00
Michael Crosby 1e6370fd4b Merge branch 'release' 2013-09-24 19:54:06 -07:00
Solomon Hykes a59a66528b Merge pull request #1968 from tianon/hack-build-instructions
* Hack: Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly
2013-09-24 17:38:39 -07:00
Andy Rothfusz b048e9dffc Merge pull request #1983 from blissdev/patch-1
various command fixes in postgres example
2013-09-24 14:03:48 -07:00
blissdev c000e6a7fc revert removal of slash betwixt user/repo 2013-09-24 15:51:21 -05:00
Tianon Gravi aa3de0b849 Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly, since release instructions already exist in release.sh 2013-09-24 14:36:20 -06:00
Michael Crosby 648d759517 Merge pull request #1972 from dotcloud/bump_0.6.3
Bump to version v0.6.3
2013-09-24 11:20:27 -07:00
Andy Rothfusz 5c190fa926 Fix #1993: add explanation for export restrictions 2013-09-24 11:04:08 -07:00
Solomon Hykes 03fe5632d0 Merge pull request #1970 from dotcloud/cleanup-hack
Cleanup and reorganize docs and tooling for contributors and maintainers
2013-09-24 10:38:21 -07:00
Dan Buch edde4f55e0 Adding more tests around auth.ResolveAuthConfig
mostly because I've been failing at getting docker `0.6.2` working with
docker-registry `0.6.0` with regard to login and push.  I suspect there
may be some mismatched expectations between `auth.ResolveAuthConfig` and
`registry.ResolveRepositoryName`, but I haven't done enough research or
experimentation to think it's anything more than user error.  More tests
are good, no?
2013-09-24 12:36:50 -04:00
Victor Vieux 7447867edd Merge pull request #1982 from modcloth-labs/spelling-fix-for-the-word-protocol
Minor spelling correction of protocoll -> protocol
2013-09-24 07:40:21 -07:00
Alexander Larsson c1c74cb0b1 Container: Always create a new session for the container
We never want the container to be in the same process group as the
daemon, as then the container will receive signals sent to the
process group of the container.
2013-09-24 14:57:29 +02:00
blissdev 17b7194d91 use su instead of sudo 2013-09-24 02:25:16 -05:00
Jordan Arentsen 15ad2915b9 various command fixes
Indicating the repository and tag should be separated by a space and not a '/'. Also fixed a quote typo.
2013-09-24 02:12:24 -05:00
Tianon Gravi d6887b769c Merge pull request #1883 from tianon/mkimage-debian
Several small tweaks/fixes for contrib/mkimage-debian.sh
2013-09-23 22:44:16 -07:00
Tianon Gravi 10362870db Add a few tweaks and fixes to contrib/mkimage-debian.sh
Add simple workaround for #1755 to contrib/mkimage-debian.sh

Add simple echo patch in contrib/mkimage-debian.sh to prevent init scripts from running during apt-get installs/updates

Add `apt-get clean` to mkimage-debian.sh for slightly smaller images

Add more small apt tweaks to mkimage-debian.sh thanks to @jpetazzo and @spahl
2013-09-23 22:39:57 -06:00
Dan Buch a7db125480 Minor spelling correction of protocoll -> protocol 2013-09-23 23:14:42 -04:00
Solomon Hykes f6c64827c8 Hack: correct typo in release checklist 2013-09-23 18:43:08 -07:00
Andy Rothfusz 30b759ffa9 Merge pull request #1973 from metalivedev/1969-formatfix
Fix #1969 formatting, add information about multiline json
2013-09-23 13:17:55 -07:00
Michael Crosby 35ca35ffb6 Merge pull request #1975 from tianon/patch-1
Add @tianon to hack/MAINTAINERS
2013-09-23 12:21:36 -07:00
Tianon Gravi a4067b1b44 Add @tianon to hack/MAINTAINERS 2013-09-23 12:39:14 -06:00
Michael Crosby b0a49a30c7 Bump to version v0.6.3 2013-09-23 11:29:11 -07:00
Andy Rothfusz 6097644e4b Fix #1969 formatting, add information about multiline json 2013-09-23 11:29:08 -07:00
Solomon Hykes fa3837abf1 Hack: update README 2013-09-23 11:26:05 -07:00
Solomon Hykes baff72bc82 Update maintainer's manual: every change should be done in a pull request. 2013-09-23 11:26:05 -07:00
Solomon Hykes 99377de7d2 Hack: update release checklist and reference it in REAMDE 2013-09-23 11:26:04 -07:00
Solomon Hykes 0ef5bcb17d hack/MAINTAINERS.md: a maintainer's manual. 2013-09-23 11:26:04 -07:00
Solomon Hykes fd1c43f0e0 Hack: remove deprecated files 2013-09-23 11:26:03 -07:00
Michael Crosby dc06496dc8 Merge pull request #1967 from dotcloud/vendor-update-tar
Update tar dependency to newest version
2013-09-23 10:44:42 -07:00
Michael Crosby cfbe76e559 Update tar dependency to newest version 2013-09-23 09:59:04 -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
Daniel Mizyrycki 8240e37b87 Merge pull request #1820 from dotcloud/1647-api-group
packaging, issue #1647: Add docker groupname on the package release
2013-09-22 14:21:26 -07:00
Michael Crosby 23cf3c7a33 Merge pull request #1934 from dotcloud/host-permissions
Only copy files and change permissions with non bindmount
2013-09-22 09:40:52 -07:00
Tianon Gravi e37bb50628 Add proper bash completion for "docker push" 2013-09-20 21:22:51 -06:00
Andy Rothfusz 2819cfb3f3 Merge pull request #1954 from metalivedev/1901-cherrypick-builddocker
1901 1929 1932 cherrypick to release and docs
2013-09-20 18:13:11 -07:00
Andy Rothfusz a479f7659d Merge pull request #1929 from tianon/gentoo-docs
Simplified Gentoo install instructions now that our overlay is in the official layman repositories.xml list
2013-09-20 18:06:27 -07:00
Andy Rothfusz b02a591f57 Merge pull request #1932 from jcassee/patch-1
Download Ubuntu 13.04 repository key over HTTPS
2013-09-20 18:02:40 -07:00
Andy Rothfusz c654075654 Merge pull request #1901 from jalateras/update-contributring-docs
Fix #1664
2013-09-20 17:55:15 -07:00
Andy Rothfusz 5a3dcbb3f6 Merge pull request #1952 from metalivedev/1909-cherrypick
Fix minor typo
2013-09-20 16:56:07 -07:00
Nick Stinemates cce6f00c0c Fix minor typo
Changed  to
2013-09-20 16:31:57 -07:00
Michael Crosby 4db64111bd Merge pull request #1949 from dotcloud/1895-registry-regex
Modify repository name regex to match index
2013-09-20 14:03:50 -07:00
Guillaume J. Charmes e97364ecd7 Improve detach unit tests 2013-09-20 13:36:19 -07:00
Guillaume J. Charmes 2bd089dadb Fix attach issue 2013-09-20 11:31:00 -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
Victor Vieux a81393787f Merge pull request #1889 from dsissitka/fixhttpimport
Fixed HTTP imports.
2013-09-20 03:06:04 -07:00
Michael Crosby b45e280ee8 Only copy files and change permissions with non bindmount 2013-09-19 20:35:05 -07:00
Michael Crosby 5867f9e761 Modify repository name regex to match index 2013-09-19 20:25:00 -07:00
Andy Rothfusz 6132f378e0 Merge pull request #1901 from jalateras/update-contributring-docs
Fix #1664
2013-09-19 18:00:23 -07:00
Jim Alateras 3cf4b2c7c1 Updated the section about extracting the binary 2013-09-20 10:00:30 +10:00
Jim Alateras d70cbbf1fc Updated the section about extracting the binary 2013-09-20 09:58:12 +10:00
Jim Alateras b7e7104e92 Updated the section about extracting the binary 2013-09-20 09:49:20 +10:00
Andy Rothfusz 7e60a6b1ea Merge pull request #1932 from jcassee/patch-1
Download Ubuntu 13.04 repository key over HTTPS
2013-09-19 13:41:51 -07:00
Andy Rothfusz 45979a7ef7 Merge pull request #1929 from tianon/gentoo-docs
Simplified Gentoo install instructions now that our overlay is in the official layman repositories.xml list
2013-09-19 13:41:29 -07:00
Joost Cassee 5c9213258a Download Ubuntu 13.04 repository key over HTTPS 2013-09-19 21:14:39 +02:00
Guillaume J. Charmes 68074fce68 Merge pull request #1886 from dotcloud/multi-volumes-from
* Runtime: Allow multiple volumes-from
2013-09-19 12:01:12 -07:00
Andy Rothfusz c42056b969 Merge pull request #1914 from tianon/base-repository-is-deprecated
Removing the deprecated `base` repository from more docs
2013-09-19 11:04:11 -07:00
Tianon Gravi 341addeccd Simplify install instructions now that our overlay is in the official repositories.xml list, and add note about hacky #1422 workaround 2013-09-19 11:49:43 -06:00
Tianon Gravi 47904290a5 Remove many remaining docs references to the deprecated base repository and several other minor doc cleanups 2013-09-19 10:27:08 -06:00
Solomon Hykes a18c26392f Docs: remove reference to deprecated 'base' image 2013-09-19 10:25:30 -06:00
Andy Rothfusz 77ad95d372 Merge pull request #1913 from metalivedev/1654-registryexamples
Fix #1654 Improve the introduction to repositories flow.
2013-09-18 17:53:13 -07:00
Guillaume J. Charmes fee61895f2 Update VERSION 2013-09-18 12:06:29 -07:00
Guillaume J. Charmes f6a78f89ba Merge remote-tracking branch 'origin/release' 2013-09-18 12:06:10 -07:00
Daniel Mizyrycki 081543c49a Merge pull request #1908 from dotcloud/bump_v0.6.2
Bump v0.6.2
2013-09-18 11:21:51 -07:00
Jim Alateras 4054f31471 Updated the dev environment document 2013-09-18 14:18:05 +10:00
Jim Alateras 76a07371c5 Further updates to the dev environment document 2013-09-18 14:18:05 +10:00
Jim Alateras 5d364fda3c Further updates to the dev environment document 2013-09-18 14:18:05 +10:00
Jim Alateras 28311f61be Update the devenvironment document 2013-09-18 14:18:05 +10:00
Jim Alateras 70b731735c Updated the dev environment document 2013-09-18 12:41:12 +10:00
Andy Rothfusz 67453d6b48 Fix #1654 Improve the introduction to repositories flow. 2013-09-17 19:01:11 -07:00
Andy Rothfusz c14450ae5c Merge pull request #1909 from dotcloud/fix-typo-docs
Fix minor typo
2013-09-17 18:25:59 -07:00
Nick Stinemates 593566438d Fix minor typo
Changed  to
2013-09-17 18:49:47 +00:00
Guillaume J. Charmes ca5913ff3e Bump version to 0.6.2 2013-09-17 11:11:39 -07:00
Solomon Hykes 85f3ec88a6 Merge pull request #1893 from dotcloud/add-tianon-maintainer
Add Tianon to contrib/ maintainers
2013-09-17 11:00:48 -07:00
Michael Crosby b2707dccc1 Merge pull request #1898 from dotcloud/smallfix_registry
Prevent panic upon error pulling registry
2013-09-17 10:27:19 -07:00
Michael Crosby b826351337 Merge pull request #1897 from dotcloud/update_doc
Update the commit documentation with better example
2013-09-17 10:21:45 -07:00
Jim Alateras 5797e7e34e Further updates to the dev environment document 2013-09-17 21:05:55 +10:00
Jim Alateras 089a60c2cf Further updates to the dev environment document 2013-09-17 21:02:57 +10:00
Jim Alateras a99a8386fd Update the devenvironment document 2013-09-17 19:29:13 +10:00
Daniel Mizyrycki dfd0deefbb packaging, issue #1647: Add docker groupname on the package release 2013-09-16 23:00:54 -07:00
Andy Rothfusz 2183644578 Information about data persistence 2013-09-16 16:44:54 -07:00
Guillaume J. Charmes e836b0064b Prevent panic upon error pulling registry 2013-09-16 16:18:25 -07:00
Michael Crosby 986906cd7b Merge pull request #1892 from dotcloud/fix-maintainers-files
Add MAINTAINERS
2013-09-16 14:41:36 -07: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 cdce873ea0 Merge pull request #1896 from dotcloud/1885-missing-hostfile
Only mount hostname files if config exists
2013-09-16 11:29:52 -07:00
Michael Crosby 5a01f7485c Only mount hostname files if config exists 2013-09-16 17:53:24 +00: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
Nick Stinemates 9946981c61 Add Tianon to contrib/ maintainers
He's awesome and always contributing to this area.
2013-09-16 04:50:53 +00:00
Nick Stinemates d6cf41cbe6 Add MAINTAINERS
Making sure we're consistent across our project.
2013-09-16 04:45:01 +00:00
David Sissitka c6b4076125 Fixed HTTP imports. 2013-09-15 18:40:29 -07:00
Michael Crosby b79bd4e864 Allow multiple volumes-from 2013-09-14 20:09:15 +00:00
Solomon Hykes 2f24b9e05c Merge pull request #1884 from dotcloud/update-vendored-deps
* Hack: Update vendored dependendies
2013-09-13 20:55:06 -07:00
Solomon Hykes a63cfe7153 Merge pull request #1847 from dotcloud/test-docker-in-docker
* Hack: make the build tool more dev-friendly and packager-friendly
2013-09-13 20:19:37 -07:00
Andy Rothfusz cd289cc10c clarify "use" 2013-09-13 17:22:53 -07:00
Andy Rothfusz 894eff64b4 Merge pull request #1880 from getvictor/patch-api
Fixed LxcConf example in Remote API v1.4 and v1.5
2013-09-13 13:28:26 -07:00
Andy Rothfusz 71e15d1c3c Merge pull request #1881 from dotcloud/ubuntu-install-instructions
Change apt source to http
2013-09-13 13:27:58 -07:00
Michael Crosby 74daeccec5 Change apt source to http 2013-09-13 19:21:43 +00:00
getvictor 102522bcd1 Fixing LxcConf example in docker_remote_api_v1.4.rst 2013-09-13 14:10:05 -05:00
getvictor b3cbf424ec Fixed LxcConf example for docker_remote_api_v1.5.rst
Based on how command line docker sends the request.
2013-09-13 14:09:05 -05:00
Michael Crosby 33972627b7 Merge pull request #1848 from dotcloud/build-clean
Add rm option to docker build to remove intermediate containers
2013-09-13 10:58:59 -07:00
Michael Crosby 4234fc699f Merge pull request #1716 from eliasp/fixme
Added FIXME for iproute → netlink as advised in issue #925.
2013-09-13 10:58:28 -07:00
Solomon Hykes 4a707a8800 Add go.net to vendored dependencies 2013-09-13 10:24:38 -07:00
Michael Crosby b986fd00e0 Merge pull request #1846 from dotcloud/fix_return_error
Fix wrong return error
2013-09-13 09:44:38 -07:00
Daniel Mizyrycki f368fd9f9f Merge pull request #1862 from dotcloud/dockerfile-multiline-space
Replace multiline with empty string not space
2013-09-13 08:52:57 -07:00
Solomon Hykes 6c1c404501 Updated vendored dependencies 2013-09-12 20:42:26 -07:00
Guillaume J. Charmes 796d7a49f0 Update the commit documentation with better example 2013-09-12 13:26:31 -07:00
Michael Crosby ffc850244f Merge pull request #1741 from griff/1737_fix_volume_uid_gid
Transfer uid and gid from image to volume
2013-09-12 10:38:37 -07:00
Andy Rothfusz 83623675ce Merge pull request #1593 from kyleconroy/master
Enable mobile view for website.
2013-09-12 10:30:16 -07:00
Andy Rothfusz 46f644c074 Merge pull request #1865 from lgp171188/patch-1
Fixed a minor typo
2013-09-12 10:11:18 -07:00
Andy Rothfusz 1bc2ab05ec Merge pull request #1859 from Bachmann1234/patch-1
Fix typo in hello_world.rst
2013-09-12 10:10:49 -07:00
Michael Crosby 1d935c6307 Update docker.bash script for build -rm 2013-09-12 16:57:10 +00:00
Michael Crosby b7a3fc687e Add rm option to docker build to remove intermediate containers 2013-09-12 16:55:36 +00:00
Guruprasad 718b1f9fe7 Fixed a minor typo
Changed "You need to enable namespaces and cgroups, to the extend of what is needed to run LXC containers" to "You need to enable namespaces and cgroups, to the extent of what is needed to run LXC containers"
2013-09-12 13:25:05 +05:30
Solomon Hykes 45cedefadb hack/vendor.sh: overwrite existing dependencies and remove .git so they can be checked in 2013-09-11 18:38:09 -07:00
Michael Crosby 1e723bc95a Replace multiline with empty string not space 2013-09-11 23:43:55 +00:00
Guillaume J. Charmes 082d142024 Add documentation 2013-09-11 15:41:44 -07:00
Kyle Conroy 9dd98df1a3 Merge branch 'master' of https://github.com/dotcloud/docker 2013-09-11 15:38:52 -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 289350e633 Add stderr unit test 2013-09-11 14:48:22 -07:00
Guillaume J. Charmes 8ae5348a51 Split stdout stderr for non-tty commands 2013-09-11 14:48:22 -07:00
Andy Rothfusz 557e3ec88e Merge pull request #1851 from metalivedev/1601-ec2install
Fix #1601 and #1845
2013-09-11 14:41:43 -07:00
Matt Bachmann dfe45e1ad5 Update hello_world.rst
Small typo
2013-09-11 15:35:05 -04:00
Victor Vieux d5480fb78d Merge pull request #1857 from shin-/master
Fixed push bug
2013-09-11 10:52:05 -07:00
shin- c6dc90ccb9 Fixed push bug 2013-09-11 19:39:33 +02:00
Michael Crosby 02037a9b53 Merge pull request #1726 from dsissitka/1615-2
Updated "POST /containers/create" to return the right Content-Type. Fixes #1615.
2013-09-11 09:09:48 -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
Andy Rothfusz 21be3b76e9 Fix #1601 with vagrantless installation instructions. 2013-09-10 18:54:13 -07:00
Brian Olsen 9cfbaecfe5 Transfer uid and gid to volume. Fixes #1737. 2013-09-11 03:17:42 +02:00
Solomon Hykes ebee8f28ac hack/make.sh print a warning but don't exit if called outside a correct build environment. 2013-09-10 18:08:02 -07:00
Solomon Hykes 03e36caeb1 Fix typo and add dependency details in hack/PACKAGERS.md 2013-09-10 18:02:33 -07:00
Victor Vieux f482432a76 improved hostConfig reload 2013-09-10 22:13:15 +00:00
Andy Rothfusz c75926be4f Fix #1845 lxc typo in images 2013-09-10 14:54:35 -07:00
Michael Crosby bd0e4fde9a Merge pull request #1838 from jmcvetta/multiline_dockerfile
Implementation of multiline syntax for Dockerfile
2013-09-10 14:22:34 -07:00
Andy Rothfusz de75241b62 Merge pull request #1835 from metalivedev/1821-exampleslanding
fix #1821 landing page for examples
2013-09-10 14:14:00 -07:00
Solomon Hykes 228b7af516 Remove fixed FIXMEs 2013-09-10 11:33:37 -07:00
Solomon Hykes d14058bc29 Update usage comments in hack/make.sh 2013-09-10 11:33:26 -07:00
Solomon Hykes 5b361f31f7 Packager's manual: official build vs distro build 2013-09-10 11:30:14 -07:00
Kyle Conroy c24c5c3b60 Merge branch 'master' of https://github.com/dotcloud/docker 2013-09-10 10:57:33 -07:00
Victor Vieux 44d0f941f2 fix wrong return error 2013-09-10 17:16:59 +00:00
Victor Vieux b7826f5666 add Brian Olsen to AUTHORS 2013-09-10 16:55:27 +00:00
Victor Vieux 27ca0c225a Merge branch '1582_fix_volume_content' of https://github.com/griff/docker into griff-1582_fix_volume_content 2013-09-10 16:52:46 +00: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
Solomon Hykes 14bbbcd571 PACKAGERS.md: a guide to packaging Docker for your favorite distro 2013-09-09 23:39:55 -07:00
Solomon Hykes 3d39336a46 Break down hack/make.sh into small scripts, one per 'bundle': test, binary, ubuntu etc. 2013-09-09 18:45:40 -07:00
Jason McVetta 6a4afb7f8e stricter regexp for Dockerfile line continuations 2013-09-09 18:23:57 -07:00
Jason McVetta c01f6df43e Test dockerfile with line containing literal "\n" 2013-09-09 18:23:17 -07:00
Michael Crosby e89396809f Merge pull request #1735 from dotcloud/1301-support-domainname
Add domain name support
2013-09-09 17:21:11 -07:00
Jason McVetta 4f3b8033f2 cruft removal 2013-09-09 17:17:09 -07:00
Jason McVetta ebb934c1b0 line continuation regex 2013-09-09 17:02:45 -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
Jason McVetta 6921ca4813 read Dockerfile into memory before parsing, to facilitate regexp preprocessing 2013-09-09 16:42:04 -07:00
Solomon Hykes 59856a20bf Add the output of the tests to each release 2013-09-09 16:30:24 -07:00
Solomon Hykes b187cc40cd Integrate unit tests into hack/make.sh 2013-09-09 16:20:30 -07:00
Victor Vieux 58281b4f18 Merge pull request #1793 from reds/master
From FIXME: local path for ADD
2013-09-09 16:14:59 -07:00
Jason McVetta 672f1e0683 failing test case for multiline command in dockerfile 2013-09-09 15:21:04 -07:00
Victor Vieux dd806b4ecd add Martin Redmond to AUTHORS 2013-09-09 22:19:28 +00:00
Victor Vieux 843f9091f2 Merge branch 'filter' of https://github.com/reds/docker into reds-filter 2013-09-09 22:16:16 +00:00
Victor Vieux 53da0507e4 Merge pull request #1837 from dotcloud/fix-tests-1812
only os.Exits on error
2013-09-09 15:12:32 -07:00
Victor Vieux bd847f66c6 rebase master 2013-09-09 22:11:53 +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
Jason McVetta 6678a26d1c gofmt 2013-09-09 15:11:30 -07:00
Solomon Hykes e37dcd726f Hack: use vendored dependencies in-place, for less moving parts when developing 2013-09-09 15:05:25 -07:00
Andy Rothfusz 8ddfb4d6aa Merge pull request #1828 from mmikulicic/patch-1
Please add go-dockerclient to docker API clients doc
2013-09-09 14:51:28 -07:00
Andy Rothfusz 28f2fe9167 Merge pull request #1836 from srid/patch-2
remove docker-ruby from docs
2013-09-09 14:50:36 -07:00
Sridhar Ratnakumar 3c90e96b6d remove docker-ruby from docs
we don't maintain it anymore as we now recommend proper HTTP api based clients instead.
2013-09-09 14:42:45 -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
Andy Rothfusz 0508bd8da7 Merge pull request #1773 from hectcastro/hc-riak-example
Add a Docker example for running Riak
2013-09-09 13:31:41 -07:00
Victor Vieux 446ca4b57b fix init layer 2013-09-09 20:29:57 +00:00
Victor Vieux 4f2e59f94a bind mount /etc/hosts and /etc/hostname 2013-09-09 20:29:57 +00:00
Victor Vieux 0a436e03b8 add domainname support 2013-09-09 20:29:06 +00:00
Andy Rothfusz c66a827c98 Merge pull request #1807 from tianon/gentoo-docs
Update Gentoo docs to reflect the package name change from app-emulation/lxc-docker to app-emulation/docker
2013-09-09 13:27:48 -07:00
Andy Rothfusz fe99e51634 Created a little landing page for the examples, combined first two. 2013-09-09 13:19:07 -07:00
Joffrey F 49b5c44ee9 Merge pull request #1833 from shin-/1815-always-push-tags
Push tags to registry even if images are already uploaded
2013-09-09 13:10:40 -07:00
shin- 64bc08f1c4 Push tags to registry even if images are already uploaded 2013-09-09 21:02:37 +02:00
Andy Rothfusz 2d4ac06426 Merge pull request #1831 from brianshumate/jbs-docs-edits
Hello World Daemon edits
2013-09-09 11:48:12 -07:00
Brian Shumate 9749d94fb0 note about exiting from attachment prior to running 2013-09-09 10:30:06 -04:00
Brian Shumate 630ae43e7d improve sentence readabilty 2013-09-09 10:19:45 -04:00
Marko Mikulicic 268928ab35 Please add go-dockerclient to docker API clients doc 2013-09-09 11:01:15 +01:00
Solomon Hykes 4cd59b96ed Hack: we no longer need to generate test binaries. 2013-09-08 18:45:23 -07:00
Solomon Hykes 055bbb79c1 vendor.sh can cleanly update vendored dependencies 2013-09-07 17:48:52 -07:00
Brandon Philips 19dc3b0792 gitignore: ignore bundles directory 2013-09-07 17:35:49 -07:00
Wes Morgan 20d24a450c move deps installation to vendor.sh script 2013-09-07 17:35:48 -07:00
Solomon Hykes eca861a99d Add missing package import 2013-09-07 17:03:40 -07:00
Solomon Hykes d757bd0904 Document using the Dockerfile for interactive dev/test cycles 2013-09-06 20:16:13 -07:00
Solomon Hykes 47838051be Hack: improve the Dockerfile for an easier development workflow. Build dev container once, run a shell with source mount-binded, run tests as you edit. LIKE A BOSS. 2013-09-06 20:14:03 -07:00
Solomon Hykes fa806f26af Add usage instructions to the Dockerfile. Build, test and release docker using docker. 2013-09-06 19:58:05 -07:00
Solomon Hykes 34eab42833 Adapt Dockerfile to run docker tests inside docker 2013-09-06 19:27:49 -07:00
Solomon Hykes 3c80bd76cf Adapt the original dind script and add a description 2013-09-06 19:27:48 -07:00
Solomon Hykes c983023661 Copy dind wrapper script from github.com/jpetazzo/dind 2013-09-06 19:27:48 -07:00
Solomon Hykes 6a9f4ecf9b Add missing comments to runtime.go 2013-09-06 17:43:34 -07:00
Solomon Hykes 24e02043a2 Merge builder.go into runtime.go 2013-09-06 17:33:05 -07:00
Guillaume J. Charmes c8f885a4d0 Merge pull request #1822 from dotcloud/remove_os_user
Remove os user
2013-09-06 16:30:54 -07:00
Guillaume J. Charmes b07314e2e0 Remove import os/user 2013-09-06 23:00:21 +00:00
Solomon Hykes eed00a4afd README: remove original shipping containers 'manifesto'. It's a little long to stay here. 2013-09-06 15:09:40 -07:00
Solomon Hykes 6679f3b053 README: replace 'install instructions' and 'usage examples' with references to the website and docs 2013-09-06 15:09:04 -07:00
Solomon Hykes 70ab25a5db README: harmonize intro with website 2013-09-06 15:08:01 -07:00
Solomon Hykes bcb8d3fd86 README: refer to the docs for install instructions to remove duplication. 2013-09-06 14:52:14 -07:00
Solomon Hykes b9ca311008 Update roadmap 2013-09-06 14:48:06 -07:00
Thatcher 37186d9ef4 Merge pull request #1818 from metalivedev/655-searchswiftype
Add Swiftype search to docs
2013-09-06 13:46:50 -07:00
Andy Rothfusz 03a28da5f7 Add Swiftype search to docs 2013-09-06 13:34:24 -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
Daniel Mizyrycki f2bc7ebf1e Merge pull request #1777 from dotcloud/1620-index-test
testing, issue #1620: Add index functional test on docker-ci
2013-09-06 09:21:05 -07:00
Dmitry Demeshchuk e5239b9859 Improve network performance for VirtualBox
Without those lines, VitrualBox machines are being very slow with all network operations (tested only in OS X Lion, but they are supposed to work everywhere). See https://github.com/mitchellh/vagrant/issues/1807
2013-09-05 21:05:23 -07:00
Joffrey F 8a2fd914b2 Merge pull request #1780 from shin-/1218-push-dependencies
Respect dependency graph when pushing a repository
2013-09-05 17:32:45 -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
Michael Crosby d06a0ba1a7 Merge pull request #1811 from dotcloud/672-remove_getcache
Remove unused getCache endpoint
2013-09-05 17:07:49 -07:00
Martin Redmond 8374dac021 From FIXME: local path for ADD 2013-09-05 20:05:36 -04:00
Michael Crosby 3bc73fa21e Return the process exit code for run commands 2013-09-05 23:54:03 +00:00
Victor Vieux 0d7044955a remove unused getCache endpoint 2013-09-05 23:00:52 +00:00
Victor Vieux 20a763e519 fix indent in doc 2013-09-05 22:33:04 +00:00
Victor Vieux 5ec2fea6dd Detect images/containers conflicts in docker inspect 2013-09-05 22:31:17 +00:00
Victor Vieux 908bb65dcf Merge pull request #1803 from dotcloud/1802-skip-TestGetContainersTop
testing, issue #1802: Temporarily skip TestGetContainersTop
2013-09-05 14:44:47 -07:00
Tianon Gravi d368c2dee9 Update Gentoo docs to reflect the package name change from app-emulation/lxc-docker to app-emulation/docker as discussed in today's #docker-meeting 2013-09-05 13:36:56 -06:00
Tianon Gravi 82dd417ef6 Reformat Gentoo install instructions to 80 columns 2013-09-05 13:36:16 -06:00
Andy Rothfusz b57d7dca9d Merge pull request #1804 from Bouke/patch-1
Fix memory recommendations (Byte, not bit)
2013-09-05 11:52:00 -07:00
Michael Crosby 8e41181591 Merge pull request #1772 from dotcloud/update-tar-revision
Update tar pkg revision number
2013-09-05 10:32:53 -07:00
Bouke Haarsma fdf1fccd3e Fix memory recommendations (Byte, not bit) 2013-09-05 10:40:11 +02:00
Daniel Mizyrycki bf6e241d97 testing, issue #1802: Temporarily skip TestGetContainersTop 2013-09-04 18:20:49 -07:00
Andy Rothfusz f0cdbaa6c8 Merge pull request #1801 from vcoisne/master
Add step to docker installation using vagrant (Mac, Linux)
2013-09-04 18:15:22 -07:00
Andy Rothfusz e0d6bae1eb Merge pull request #1789 from tommyblue/patch-1
Adds instruction about UDP port redirection
2013-09-04 18:14:34 -07:00
Andy Rothfusz d6ff912917 Merge pull request #1797 from denibertovic/docs
fixed docs for installing binary
2013-09-04 18:13:25 -07:00
Victor Coisne ad04cacd28 Add step to docker installation using vagrant (Mac, Linux) 2013-09-04 17:47:18 -07:00
Deni Bertovic 62823cfb97 fixed docs for installing binary 2013-09-05 00:06:41 +02:00
shin- 9ae5054c34 Bumped API version in api.go ; added <1.5 behavior to getContainersJSON 2013-09-04 23:41:44 +02:00
Daniel Mizyrycki 8878943ac9 deployment, issue #1578: Avoid pinning kernel headers. Add Vagrantfile assumptions 2013-09-04 14:41:09 -07:00
Daniel Mizyrycki 8e3844cd34 Merge pull request #1578 from jimmycuadra/vagrant-provider-detection
Better VirtualBox detection in Vagrantfile
2013-09-04 14:40:32 -07:00
Andy Rothfusz 1a32c4a1df Merge pull request #1795 from eliasp/patch-1
Typo
2013-09-04 14:13:52 -07:00
shin- 98edd0e751 Updated docs for API v1.5 2013-09-04 22:58:58 +02: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- 34edbd4f7e Merge branch '1357-implement-login-with-private-registry' of git://github.com/mhennings/docker into mhennings-1357-implement-login-with-private-registry 2013-09-04 22:26:55 +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
Elias Probst 396274fa6d Typo 2013-09-04 21:56:51 +02:00
Jimmy Cuadra 28e75b23b3 Don't install VirtualBox Guest Additions if VAGRANT_DEFAULT_PROVIDER is set. 2013-09-04 11:21:24 -07:00
Tommaso Visconti ad5796de9f Adds instruction about UDP port redirection 2013-09-04 19:17:10 +02:00
Daniel Mizyrycki 3a6868bc2f Merge pull request #1788 from dotcloud/1787-deprecate-port-forwarding
deployment, issue #1787: Remove deprecated port forwarding from /Vagrantfile
2013-09-04 10:11:12 -07:00
Daniel Mizyrycki 34145f9840 deployment, issue #1787: Remove deprecated port forwarding from /Vagrantfile 2013-09-04 10:05:54 -07:00
Andy Rothfusz 58ea690b41 Merge pull request #1784 from proger/patch-1
add new docker api client for erlang, erldocker
2013-09-04 10:01:29 -07:00
Andy Rothfusz 3b92ab3465 Merge pull request #1783 from briehanlombaard/typos
Fixed typos
2013-09-04 10:00:10 -07:00
Andy Rothfusz 76f97a64fa Merge pull request #1785 from thijsterlouw/update_commandline_cli
Fix documentation index for cli
2013-09-04 09:59:30 -07:00
Andy Rothfusz 5974794942 Merge pull request #1782 from tianon/gentoo-docs
Added Gentoo Documentation
2013-09-04 09:58:36 -07:00
Thijs Terlouw 368d0385e1 Fix documentation index for cli 2013-09-04 13:21:44 +02:00
Vladimir Kirillov 58ffd03bf1 add new docker api client for erlang, erldocker 2013-09-04 12:53:38 +03:00
Tianon Gravi 9ce1d02ef6 Add Gentoo documentation 2013-09-04 02:59:18 -06:00
Briehan Lombaard 251d1261b0 Fixed typos 2013-09-04 10:52:53 +02:00
Daniel Mizyrycki a0a5170991 Merge pull request #1449 from spkane/honor-ENV-VAGRANT_DEFAULT_PROVIDER
Assume that if VAGRANT_DEFAULT_PROVIDER is set we shouldn't install vbox tools
2013-09-03 17:38:03 -07:00
shin- b3a70d767d Compute dependency graph and upload layers in the right order when pushing 2013-09-04 02:21:40 +02:00
Daniel Mizyrycki 91ee679549 pr #1718: Fetch docker gpg over https 2013-09-03 17:14:49 -07:00
Markus Fix 52fe452497 Changed docker apt repo URI from https to http because the http driver for apt is not installed by default 2013-09-03 17:10:03 -07:00
Daniel Mizyrycki 846524115b testing, issue #1620: Add index functional test on docker-ci 2013-09-03 15:38:06 -07:00
Hector Castro fac4cedcc1 Add a Docker example for running Riak. 2013-09-03 16:30:40 -04: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 a2603477dd Merge on current master 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
Daniel Mizyrycki 0e6ee9632c Merge pull request #1603 from dotcloud/773-docker-ci-pr
773 docker-ci github pull request
2013-09-03 11:46:34 -07: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 ea813d8593 Update tar pkg revision number 2013-09-03 18:30:32 +00: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
Andy Rothfusz 75df4953f4 Merge pull request #1758 from mattapperson/patch-1
Added NodeJS library
2013-09-03 11:02:34 -07:00
Andy Rothfusz f703b8b839 Merge pull request #1771 from thijsterlouw/missing_cli_docs
Add 2 missing cli commands to docs (events + insert)
2013-09-03 10:41: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 35fef275b3 Merge branch 'login_signal' of https://github.com/calavera/docker into login_signal
* 'login_signal' of https://github.com/calavera/docker:
  Use flag.StringVar to capture the command line flags.
  Fix syscall name.
  Remove unused imports.
  Simplify term signal handler.
  Add the ISIG syscall back to not kill the client withing a shell with ctrl+c.
  Print a new line after getting the password from stdin.
  Exit if there is any error reading from stdin.
  Stop making a raw terminal to ask for registry login credentials.
  Allow to generate signals when termios is in raw mode.
  Use a more idiomatic syntax to capture the exit.
  Exit from `docker login` on SIGTERM and SIGINT.
2013-09-01 16:10:53 -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
Brandon Liu 113bb396cd Don't export Graph.walkAll. 2013-08-31 20:44:49 -07:00
Brandon Liu 1fca99ad90 Replace Graph.All with Graph.Map 2013-08-31 20:44:42 -07:00
Matt Apperson e42d3a1bfa Added NodeJS library 2013-08-31 22:13:15 -04:00
Victor Vieux 3528990c73 Merge pull request #1665 from dotcloud/ksid-contrib-maintainer
Make Kawsar Saiyeed @KSid the maintainer for contributed tools
2013-08-30 17:07:03 -07:00
Andy Rothfusz 8ee4473d92 Merge pull request #1704 from dhrp/ubuntu-install-finger-fingerprint
added apt-key finger tip and fingerprint in ubuntu installation page
2013-08-30 16:15:19 -07:00
Daniel Mizyrycki 212b582362 Merge pull request #1673 from xdissent/1659-upstart-order
Start docker after lxc-net to prevent ip forwarding race
2013-08-30 16:05:40 -07:00
Guillaume J. Charmes 969e48dd5a Merge pull request #1752 from dotcloud/1750-build_error-fix
fix error in docker build when param is not a directory
2013-08-30 16:05:23 -07:00
Guillaume J. Charmes d9b7ec6458 Merge pull request #1754 from griff/1705_changelog_fails_before_run
- Runtime: Made calling change log before run return empty list.
2013-08-30 16:02:46 -07:00
Brian Olsen 46c9c5c843 Made calling changelog before run return empty. Fixes #1705. 2013-08-30 22:46:07 +02:00
Brian Olsen 7a9c711832 Copies content from image to volumne if non-empty. Fixes #1582. 2013-08-30 22:02:05 +02:00
Brian Olsen 6756e786ac Just fixing gofmt issues in other people's code. 2013-08-30 22:02:05 +02:00
Michael Crosby 84431ec03c Merge pull request #1613 from thijsterlouw/proper_resolvconf_parsing
Proper resolv.conf parsing
2013-08-30 12:10:45 -07:00
Victor Vieux d605e82bad fix error in docker build when param is not a directory 2013-08-30 18:08:29 +00:00
Andy Rothfusz 2ea19238ff Merge pull request #1744 from dsissitka/patch-7
Updated "Use -> The Basics" to use ubuntu:12.10.
2013-08-30 10:44:54 -07:00
Andy Rothfusz df36f9db05 Merge pull request #1749 from msiebuhr/doc-from-tags
Document FROM <image>:<tag> Dockerfile instruction.
2013-08-30 10:44:36 -07: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
Michael Crosby 6d769f4b9b Merge pull request #1743 from dotcloud/fix_version
Hide version when not available
2013-08-30 10:39:48 -07:00
Morten Siebuhr 1a8a540209 Document FROM <image>:<tag> Dockerfile instruction. 2013-08-30 15:23:32 +02:00
Shih-Yuan Lee (FourDollars) 6c206f7d78 Install Ubuntu raring backported kernel from official archives directly. 2013-08-30 14:12:13 +08:00
Andy Rothfusz 110d3b7794 Merge pull request #1736 from ramonvanalteren/patch-1
Update python_web_app.rst
2013-08-29 18:36:53 -07:00
dsissitka c0e95fa68a Updated "Use -> The Basics" to use ubuntu:12.10.
ubuntu:latest doesn't have nc. ubuntu:12.10 does.
2013-08-29 21:05:18 -04:00
Victor Vieux e3b58d3027 hide version when not available 2013-08-30 00:46:43 +00:00
Andy Rothfusz 9b029a0854 Merge pull request #1739 from dotcloud/add-docs-dockerfile
Added a Dockerfile which installs all deps and builds the Docs
2013-08-29 17:42:17 -07:00
Victor Vieux 49d35cc0ae Merge pull request #1690 from jbbarth/code-formatting
go fmt
2013-08-29 17:13:37 -07:00
Nick Stinemates c6702bebe1 added a Dockerfile which installs all deps and builds the docs. 2013-08-30 00:13:32 +00:00
Michael Crosby 690c3839fd Merge pull request #1710 from thomasf/master
Fix bash completion.
2013-08-29 17:08:14 -07:00
Victor Vieux 050cf70136 Merge pull request #1721 from andrewmunsell/patch-2
Add privileged flag in documentation for container creation
2013-08-29 17:05:40 -07:00
Guillaume J. Charmes df8f95ac74 Merge pull request #1591 from dotcloud/1557_fix_docker_run_useage
add TEST env var during tests and silenced parserun during tests
2013-08-29 16:51:34 -07:00
Andy Rothfusz 0f91418b26 Merge pull request #1729 from dsissitka/patch-6
Fixed a minor syntax error.
2013-08-29 16:27:22 -07:00
Isao Jonas 4ff649ce85 Unable to find image error should print to stderr 2013-08-29 18:25:11 -05:00
Andy Rothfusz c4394decf8 Merge pull request #1717 from metalivedev/1685-updateinstallation
Fix #1685: Notes on production use. General installation cleanup.
2013-08-29 16:06:00 -07:00
Victor Vieux f159f4710b remove message during tests 2013-08-29 22:59:34 +00:00
Victor Vieux 740a97f1a8 use init function 2013-08-29 22:55:29 +00:00
Victor Vieux eee6d3dae9 add TEST env var during tests and silenced parserun during tests 2013-08-29 22:55:29 +00:00
Ramon van Alteren 559724ac35 Update python_web_app.rst
Fixed typo in the WEB_PORT command, missing sudo in front of docker command
2013-08-30 00:37:47 +02:00
Greg Thornton 3f141e1fd3 Update remaining upstart scripts to wait for lxc-net 2013-08-29 14:06:24 -05:00
David Calavera 9f8e5a93b4 Use flag.StringVar to capture the command line flags. 2013-08-29 11:46:42 -07:00
David Calavera 78d995bbd6 Fix syscall name. 2013-08-29 11:46:42 -07:00
David Calavera e7ee2f443a Remove unused imports. 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 b54ba5095b Add the ISIG syscall back to not kill the client withing a shell with ctrl+c. 2013-08-29 11:46:41 -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
Andy Rothfusz 230dc07d37 fix logo path 2013-08-29 11:24:59 -07:00
Andy Rothfusz c46d9933ec Merge pull request #1727 from dsissitka/patch-5
Fixed a minor syntax error.
2013-08-29 11:05:22 -07:00
Andy Rothfusz bcb081a269 Merge pull request #1708 from nexxy/patch-1
Update docker_remote_api_v1.4.rst
2013-08-29 10:22:05 -07:00
dsissitka 57892365ef Fixed a minor syntax error. 2013-08-29 12:35:37 -04:00
dsissitka 075253238d Fixed a minor syntax error. 2013-08-29 12:27:35 -04:00
David Sissitka f6b56e996d Updated "POST /containers/create" to return the right Content-Type. 2013-08-29 09:14:14 -07:00
Emily Rose 18d572abb4 Added Emily Rose to AUTHORS. 2013-08-28 22:28:31 -07:00
Andrew Munsell 37a236947e Add privileged flag in documentation for container creation 2013-08-28 22:18:47 -07:00
Emily Rose c1f6914e43 Correct number of asterisks. 2013-08-28 20:01:18 -07:00
Andy Rothfusz b1eae313ad Fix #1685: Notes on production use. General installation cleanup. 2013-08-28 17:26:10 -07:00
Elias Probst a359e52f29 Added FIXME for iproute → netlink as advised in issue #925. 2013-08-29 01:50:37 +02:00
Andy Rothfusz bf98fff925 Merge pull request #1674 from jbbarth/docs
Add mercurial to the list of packages needed in a dev environment
2013-08-28 11:10:45 -07:00
Michael Crosby e6c3da42e7 Merge pull request #1696 from daniel-garcia/1448-add_newline_every_logmessage
Write newline after every log message
2013-08-28 10:00:38 -07:00
Victor Vieux d5220bc081 Merge pull request #1711 from dotcloud/1709-start_doc-fix
fix start documentation
2013-08-28 09:51:20 -07:00
Victor Vieux 66ef6c0f6e fix start doc 2013-08-28 16:40:00 +00:00
Thomas Frössman 20772f90ff Fix bash completion, remove have
Should solve #1639.
2013-08-28 18:38:06 +02:00
Kyle Conroy 9a60f36ccc Merge branch 'master' of https://github.com/dotcloud/docker 2013-08-28 06:44:21 -07:00
Emily Rose 69a93b36d5 Update docker_remote_api_v1.4.rst
Fixed a (very serious) typo.
2013-08-28 04:12:37 -07:00
Thatcher Peskens 466a88b9a8 added apt-key finger tip and fingerprint in ubuntu installation page 2013-08-27 19:59:36 -07:00
Andy Rothfusz f0620da74a Merge pull request #1703 from metalivedev/621-usebaseimages
Fix #621: add new use/base images section. Include examples.
2013-08-27 18:53:40 -07:00
Andy Rothfusz dffb72ca89 Fix #621: add new use/base images section. Include examples. 2013-08-27 18:49:43 -07:00
Andy Rothfusz 128893062b Merge pull request #1698 from metalivedev/1684-Cleanup
Fix #1684: Cleanup introduction, working with repos, "use" index.
2013-08-27 18:15:06 -07:00
shin- 98018df078 More descriptive, easier to process container portmappings information in the API 2013-08-28 00:20:35 +02:00
Andy Rothfusz 4a3b039c2a Merge pull request #1694 from dotcloud/troubleshoot_windows_installation
Troubleshooting windows installation section
2013-08-27 14:48:15 -07:00
Andy Rothfusz c627ff6e20 Fix #1684: Old Welcome is now Introduction. Working with Repos now follows Builder.
Clean up some doc build errors. Removed old Manifesto. Tweaked layout javascript
to allow direct link from first and last index elements.
2013-08-27 14:29:49 -07:00
daniel-garcia d593f57952 write newline after every log message. 2013-08-27 14:09:26 -05:00
Michael Crosby c2b273df5d Merge pull request #1611 from pysqz/master
Make sure 'Ghost' container is available with allocated IP
2013-08-27 11:30:00 -07:00
pysqz cc18a9c650 Also reuse forwarding ports 2013-08-28 03:14:21 +08:00
Daniel Mizyrycki f861c493bf Troubleshooting windows installation section 2013-08-27 11:19:32 -07: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
Andy Rothfusz 5b84252c73 Merge pull request #1622 from TylerBrock/patch-2
Some fixes for MongoDB example
2013-08-26 17:28:38 -07:00
Tyler Brock f352ec945f ENTRYPOINT fixups 2013-08-26 19:17:26 -04:00
Daniel Mizyrycki 714e424d74 Merge pull request #1656 from KSid/vagrantfile-0.6
Update Vagrantfile to use docker apt repository
2013-08-26 14:59:40 -07:00
Andy Rothfusz f7fa6c2b0b Merge pull request #1671 from kim0/patch-3
Don't force a non-existent npm version, use latest from epel
2013-08-26 14:33:07 -07: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
Michael Crosby 108b6c644b Merge pull request #1678 from dotcloud/remove-incorrect-build-instructions
Remove incorrect build instructions
2013-08-26 12:56:08 -07:00
Guillaume J. Charmes 9ce7b1c009 Merge pull request #1663 from KSid/1661-cp-parsing-error
- Runtime: Display error if docker cp resource not specified
2013-08-26 12:51:43 -07:00
Solomon Hykes 076434ef10 Remove incorrect build instructions 2013-08-26 12:06:56 -07:00
Andy Rothfusz f2807042c2 Merge pull request #1670 from tobstarr/patch-1
Change fetching of gpg key from http to https
2013-08-26 12:00:54 -07:00
Guillaume J. Charmes d4c7340131 Merge pull request #1646 from mohitsoni/master
- Runtime: Fix uname -r kernel version parsing
2013-08-26 11:49:00 -07:00
Greg Thornton 331f983593 Start docker after lxc-net to prevent ip forwarding race 2013-08-26 09:43:49 -05:00
jbbarth 1adbadde80 Add mercurial to the list of packages needed in a dev environment
The dev environment setup procedure fails if mercurial is not installed
on the machine, it cannot download stuff from
http://code.google.com/p/go.net for instance.
2013-08-26 16:39:38 +02:00
kim0 843ef645d2 Don't force a non-existent npm version, use latest from epel
Not the smartest thing to do
2013-08-26 12:54:15 +03:00
Tobias Schwab 4440bde0eb Change fetching of gpg key from http to https
Or was there any reason to fetch using http?
2013-08-26 11:45:15 +02:00
Solomon Hykes f83d556bc0 Make Kawsar Saiyeed @KSid the maintainer for contributed tools 2013-08-24 17:16:52 -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
Nick Stinemates c864647721 Merge pull request #1658 from jamescarr/patch-1
Update for new mailing list
2013-08-24 10:28:26 -07:00
Nick Stinemates 2891e828bd Merge pull request #1657 from KSid/bash-completion-0.6
Add latest docker options to docker.bash
2013-08-24 10:27:25 -07:00
James Carr 465d5313c5 Update for new mailing list 2013-08-24 10:26:54 -07:00
Kawsar Saiyeed 02d1d238cd Add latest docker options to docker.bash
Adds bash completion options for the latest docker release (0.6.1)
2013-08-24 18:04:40 +01:00
Kawsar Saiyeed 1f85ed6825 Update Vagrantfile to use docker apt repository 2013-08-24 16:49:55 +01:00
Mohit Soni ef82690144 Merge remote-tracking branch 'upstream/master' 2013-08-24 00:33:01 -07:00
Mohit Soni f4432d50c3 Refactored code and added unit tests
- Extracted ParseRelease method from GetKernelVersion to make code
  more testable
- Added tests for ParseRelease method
2013-08-24 00:24:40 -07:00
Andy Rothfusz 820a3b962a Merge pull request #1634 from songgao/patch-1
Added utils/utils.go : CopyEscapable escale sequence to tutorial.
2013-08-23 18:52:17 -07:00
Michael Crosby 99a8306898 Merge release 0.6.1 back to master
Conflicts:
	VERSION
2013-08-23 22:59:29 +00:00
Michael Crosby bd16107e97 Merge pull request #1648 from dotcloud/bump_0.6.1
Bump to 0.6.1
2013-08-23 15:49:28 -07:00
Michael Crosby 5105263dac Bump to v0.6.1 2013-08-23 22:23:30 +00:00
Michael Crosby 7b5c579b77 Use correct upstart script with new build tool 2013-08-23 22:20:36 +00:00
Michael Crosby dcfb993ac7 Merge pull request #1642 from dotcloud/upstart-exec
Use correct upstart script with new build tool
2013-08-23 15:18:58 -07:00
Andy Rothfusz dd9ee039a6 Merge pull request #1633 from abhirajbutala/patch-1
Update docker_remote_api.rst
2013-08-23 15:17:21 -07:00
Kawsar Saiyeed 15d658d36b Removed duplicate mercurial install command 2013-08-23 22:16:49 +00:00
unclejack 59281d6f80 use libffi-dev, don't build it from sources 2013-08-23 22:16:23 +00:00
shin- 29be20f987 Fixed: ImagePull in runtime test 2013-08-23 22:16:11 +00:00
shin- 5a8c32dc8e Use additional decorator in RequestFactory to pass meta headers to registry 2013-08-23 22:16:03 +00:00
Michael Crosby 3d9b4379a5 Use correct upstart script with new build tool 2013-08-23 22:10:18 +00:00
Mohit Soni ab882da03b Fixes #1643
Changed the split statement, from SplitN to Split. Doing so takes
care of cases, when a minor version is followed by a suffix, that
starts with '.'.
2013-08-23 14:37:37 -07:00
Thatcher e2594d162e Merge pull request #1641 from dotcloud/docs-0.6-gpg-key
Docs 0.6 gpg key
2013-08-23 13:14:21 -07:00
Thatcher Peskens ebb9b5e85b Added adding the gpg key 2013-08-23 12:56:03 -07:00
Michael Crosby 98f9d3e81c Merge pull request #1562 from AnSavvides/contributing-link
Adding direct reference to contribution guidelines
2013-08-23 12:18:24 -07:00
Thatcher Peskens 091fb89294 Added line on top of ubuntulinux announcing change in 0.6
Added lines on top of vagrant installs
2013-08-23 11:45:52 -07:00
Michael Crosby db91cac44f Merge pull request #1635 from unclejack/fix_main_dockerfile
Fix libffi build failure for the main Dockerfile
2013-08-23 11:31:19 -07:00
Guillaume J. Charmes 8dd3607bd1 Merge pull request #1563 from dotcloud/1073_add_loading_message
* Runtime: Add loading containers message in no debug
2013-08-23 11:20:22 -07:00
Solomon Hykes 3ebda17f0f Merge pull request #1637 from dhrp/change-docs-ubuntu-sources
Updated the docs to reflect we no longer use Launchpad and host our own
2013-08-23 11:05:59 -07:00
Michael Crosby 9149c45745 Merge pull request #1627 from shin-/registry_metaheaders
Pass "meta" headers in API calls to the registry
2013-08-23 11:05:41 -07:00
Michael Crosby 969ab9c450 Merged 0.6.0 release back to master 2013-08-23 17:50:24 +00:00
Michael Crosby 588f8e1cec Merge pull request #1628 from dotcloud/bump_0.6.0
Bump to 0.6.0
2013-08-23 10:45:14 -07:00
Thatcher Peskens f753dfe6b3 Updated the docs to reflect we no longer use Launchpad and host our own repository. 2013-08-23 10:41:53 -07: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
unclejack 72cfa3de35 use libffi-dev, don't build it from sources 2013-08-23 19:13:30 +03:00
Abhiraj Butala 3396a183c6 Update docker_remote_api.rst 2013-08-23 01:28:58 -07:00
shin- 1c6af604e8 Fixed: ImagePull in runtime test 2013-08-23 04:32:09 +02:00
Guillaume J. Charmes ccc2276469 Merge pull request #1630 from KSid/docker-build-dockerfile
Removed duplicate mercurial install command from Dockerfile
2013-08-22 17:31:35 -07:00
Guillaume J. Charmes 78a71b1273 Merge pull request #1587 from dotcloud/1559_improve_version
Improve version
2013-08-22 17:28:18 -07:00
Kawsar Saiyeed 2191419f4c Removed duplicate mercurial install command 2013-08-22 23:12:28 +01:00
Michael Crosby f4a4f1ca87 Bump to 0.6.0 2013-08-22 21:09:50 +00: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
shin- 093b85b72f Use additional decorator in RequestFactory to pass meta headers to registry 2013-08-22 21:15:31 +02: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 a3510c99f1 Merge pull request #1560 from dotcloud/439-allow-lxc-args
Add lxc-conf flag to allow custom lxc options
2013-08-22 09:34:27 -07:00
Michael Crosby 262d57e387 Merge pull request #1623 from mhennings/1592-fix-race-conditions-in-parallel-pull
Fix race conditions in parallel pull
2013-08-22 09:30:21 -07:00
Michael Crosby 551092f9c0 Add lxc-conf flag to allow custom lxc options 2013-08-22 16:05:21 +00: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
Tyler Brock d6f53049c4 Some fixes for MongoDB example 2013-08-21 23:48:32 -04:00
Daniel Mizyrycki 5e3386473a testing, issue #773: Add infrastructure docker-ci PR documentation 2013-08-21 17:39:45 -07:00
Andy Rothfusz 0b9c8e2860 Merge pull request #1596 from metalivedev/1149-easyfixes
Fix #1330 and #1149. Improve CMD, ENTRYPOINT, and attach docs.
2013-08-21 14:06:41 -07:00
Andy Rothfusz 42fe550c9e Merge pull request #1614 from denibertovic/docs
Small fix to docs regarding adding docker groups
2013-08-21 12:26:56 -07:00
Andy Rothfusz f5bd137216 Add mongodb example 2013-08-21 12:09:40 -07:00
Andy Rothfusz 348696f3fe Merge pull request #1607 from TylerBrock/mongodb
Add MongoDB image example
2013-08-21 12:07:50 -07:00
Michael Crosby 6da071985f Merge pull request #1513 from dotcloud/add_user_dockerfile
Add USER instruction do Dockerfile
2013-08-21 09:19:31 -07: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 e0a7013836 Merge pull request #1576 from MatthewMueller/patch-1
updated default -H docs
2013-08-21 09:09:43 -07:00
Deni Bertovic 467dbb75f1 small fix to docs regarding adding docker groups 2013-08-21 17:28:13 +02:00
pysqz 2f6ce27fde Make sure 'Ghost' container is available with allocated IP 2013-08-21 22:37:58 +08:00
Thijs Terlouw c349b4d56c Keep linebreaks and generalize code 2013-08-21 15:48:39 +02:00
Thijs Terlouw 62e84785b6 proper resolv.conf parsing 2013-08-21 15:23:12 +02:00
Matt Mueller 215094903a update help 2013-08-21 02:08:32 -07:00
Jérôme Petazzoni 8a7c0495e0 Remove -x flag — we do not want to be *that* verbose. 2013-08-20 20:50:42 -07:00
Jérôme Petazzoni 885afebe07 Bump up VERSION file to 0.5.3-dev 2013-08-20 19:36:42 -07:00
Jérôme Petazzoni e06372d6f4 Update packaging/README to point to hack/release 2013-08-20 19:36:06 -07:00
Jérôme Petazzoni b5a48eaed3 Moved release scripts to hack/release and updated instructions. 2013-08-20 19:36:06 -07:00
Jérôme Petazzoni a8059059c6 +CHANGES is now -dirty (works better in URLs), and we have postinstall and prerm jobs. 2013-08-20 19:36:06 -07:00
Jérôme Petazzoni c8c69a1499 Bump to 0.5.3 (VERSION file) 2013-08-20 19:36:06 -07:00
Jérôme Petazzoni 0469e47674 Release script also takes care of index file (if the S3 bucket is WS-enabled) 2013-08-20 19:36:06 -07:00
Jérôme Petazzoni 5b630d436d If there are changes, add the timestamp to the package version. 2013-08-20 19:35:31 -07:00
Jérôme Petazzoni 9c06420b18 Implement apt-secure repository signing. 2013-08-20 19:35:31 -07:00
Jérôme Petazzoni 87872006ce Repository should also have i386 index, since Ubuntu is multi-arch by default 2013-08-20 19:35:31 -07:00
Jérôme Petazzoni abfa7a204d Update to go 1.1.2. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni 5b0eaef602 Run reprepro from release, incrementally (it needs S3 credentials). Add virtual package. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni 9694fb85d7 Install python-magic (it helps s3cmd) and a convenience /src symlink 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni bfee2c726e Polish instructions a little bit. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni ab4fb9bbfa Add a check for S3 bucket access. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni fbd5b20c38 Running the build image will now execute release.sh automatically. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni ff30eb96b6 Protect the release.sh script against accidental use. Infer VERSION automatically. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni 749a7d0e4f Add a check to make sure that make.sh only runs within a container. 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni d9f769930b Cosmetic changes: rewrapping, `` → $()… before starting the real work 2013-08-20 19:35:30 -07:00
Jérôme Petazzoni d750060f0c add "|| true" otherwise "set -e" kills us if the repo is clean 2013-08-20 19:35:30 -07:00
Guillaume J. Charmes bdbac9f7a1 Upgrade Dockerfile with new dependency 2013-08-20 19:35:30 -07:00
Solomon Hykes 13201775de Update release checklist. Still needs work. 2013-08-20 19:34:10 -07:00
Solomon Hykes ccc3969536 release.sh: publish a full release of docker to a S3 bucket, including static binary and a full APT repository with install instructions 2013-08-20 19:34:10 -07:00
Solomon Hykes 89ee524229 Good-bye, ugly mega-Makefile. Docker can now be built with docker, with the help of a simple very simple shell script. 2013-08-20 19:34:10 -07:00
Solomon Hykes 9fce6f662a docker -v: show version and build information without making remote connections 2013-08-20 19:32:37 -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
Solomon Hykes aa2ab5143b Deprecate dockerbuilder in favor of a standard Dockerfile 2013-08-20 19:31:30 -07:00
Tyler Brock 2c147dd721 add mongodb image example 2013-08-20 18:08:15 -04:00
Daniel Mizyrycki ee64e099e0 testing, issue #773: Automatically test pull requests on docker-ci 2013-08-20 12:32:32 -07:00
Daniel Mizyrycki 30726c3785 Improve docker-ci deployment and tests 2013-08-20 12:18:29 -07:00
Victor Vieux 41973d41e9 fix typo 2013-08-20 11:52:37 +00:00
Victor Vieux f69c465231 rebase docs 2013-08-20 11:42:53 +00:00
Andy Rothfusz 75f4fd978d Fix #1330 and #1149. Improve CMD, ENTRYPOINT, and attach docs. 2013-08-19 19:13:26 -07:00
Kyle Conroy e9a1246527 Enable mobile view for website.
The documentation currently uses responsive Bootstrap, but didn't
include the correct meta tag for proper display on mobile devices.
2013-08-19 11:54:51 -07:00
Andy Rothfusz d627ff9697 Merge pull request #1590 from elmendalerenda/patch-3
fixed postgresql conf setting
2013-08-19 10:27:43 -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
Michael Crosby 9c829cb5b4 Merge pull request #1581 from mhennings/workdirsupport-buildfile
Add workdir support for the Buildfile
2013-08-19 09:18:22 -07:00
elmendalerenda 83acd37161 fixed postgresql conf setting
small typo, changed listen_address to listen_addresses
2013-08-19 14:20:25 +01:00
Victor Vieux b21f898620 assume ip_forwarding = 1 by default 2013-08-19 12:34:30 +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
Song Gao b22c973110 Added escape sequence to tutorial 2013-08-18 21:44:46 -05:00
Marco Hennings 319988336c Add workdir support for the Buildfile
For consistency the Buildfile should have the option to
set the working directory.

Of course that is one option more to the buildfile,
so please tell me if we really want this to happen.
2013-08-18 20:30:19 +02:00
Michael Crosby 67c9ce6dd1 Merge pull request #1459 from mhennings/set-working-directory
Add an option to set the working directory
2013-08-18 11:23:34 -07:00
Marco Hennings 687d27ab57 Add an option to set the working directory.
This makes it possible to simply wrap a command inside a container. This makes
it easier to use a container as an unified build environment.

Examples:

~/workspace/docker
$ docker  run  -v `pwd`:`pwd` -w `pwd` -i -t  ubuntu ls
AUTHORS		 Makefile	archive.go	   changes.go	      docker
[...]


docker  run  -v `pwd`:`pwd` -w `pwd` -i -t  ubuntu pwd
/home/marco/workspace/docker
2013-08-18 19:34:01 +02:00
David Calavera 6aff117164 Use flag.StringVar to capture the command line flags. 2013-08-17 22:28:05 -07:00
David Calavera e69f714219 Fix syscall name. 2013-08-17 22:22:49 -07:00
David Calavera 276d2bbf1d Remove unused imports. 2013-08-17 22:22:11 -07: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
Matt Mueller f409c11916 add to cli 2013-08-17 22:10:06 -07:00
Michael Crosby 3885ee00c5 Merge pull request #1575 from evanphx/tags
Show tag used when image is missing
2013-08-17 22:05:58 -07:00
Matthew Mueller 5325703c27 updated default 2013-08-17 21:54:10 -07:00
David Calavera 45543d012e Simplify term signal handler. 2013-08-17 21:29:37 -07:00
David Calavera 8a18999d23 Add the ISIG syscall back to not kill the client withing a shell with ctrl+c. 2013-08-17 21:08:00 -07:00
Evan Phoenix 07a887032a Show tag used when image is missing 2013-08-17 20:03:54 -07:00
Andy Rothfusz 1843a71911 Merge pull request #1550 from dotcloud/update-dependencies-in-readme
Update readme with dependencies for building
2013-08-16 17:46:25 -07:00
Guillaume J. Charmes 9ce577782c Merge pull request #1572 from dotcloud/1431-disable-TestContainerTop
Tests: testing, issue #1431: Temporarely disable TestContainerTop from the testsuite
2013-08-16 14:49:02 -07:00
Daniel Mizyrycki 422d4afdd5 testing, issue #1431: Temporarely disable TestContainerTop from the testsuite 2013-08-16 14:47:39 -07:00
Andy Rothfusz 09a08e0a9f Merge pull request #1569 from TylerBrock/patch-1
Add instructions for creating and using the docker group
2013-08-16 14:30:00 -07:00
Michael Crosby 5142e83d93 Merge pull request #1473 from shin-/978-opaque-v2
Reworking opaque requests in registry module
2013-08-16 12:24:51 -07:00
shin- 0418702cfc registry: removing opaqueRequest 2013-08-16 19:33:59 +02:00
Tyler Brock 674e5c8503 remove extraneous step and stupid whitespace 2013-08-16 13:30:54 -04:00
Tyler Brock 2ec141da54 Add instructions for creating and using the docker group 2013-08-16 13:19:59 -04:00
Victor Vieux 20b1e19641 add loading message 2013-08-16 13:43:09 +00:00
Andreas Savvides f11fb706f6 Adding direct reference to contribution guidelines 2013-08-16 12:07:37 +01:00
Michael Crosby bca19a22c5 Update readme with dependencies for building
Closes #915
2013-08-15 17:26:07 +00:00
Victor Vieux 62b45f0827 fix can't connect message
with socket
2013-08-15 13:48:08 +00:00
Victor Vieux 92a2b635a3 Merge pull request #1551 from dotcloud/hotfix_parallel_pull_display
hot fix display in parallel pull and gofmt
2013-08-15 04:43:26 -07:00
Victor Vieux d7979ef2d0 hot fix display in parallel pull and go fmt 2013-08-15 11:42:40 +00:00
Michael Crosby c5d8844d80 Merge pull request #1495 from bdon/master
Fix Graph ByParent() to generate list of child images per parent image.
2013-08-14 20:42:34 -07:00
Brian Olsen c7cda86e84 Don't read from stdout in hijack unless attached. Fixes #1503 2013-08-15 02:54:06 +02:00
Guillaume J. Charmes 4caa604793 Merge pull request #1549 from dotcloud/fix-logevent-tests
Add imagename to LogEvent tests
2013-08-14 17:02:53 -07:00
Michael Crosby 7f9ba14b18 Add imagename to LogEvent tests 2013-08-14 23:43:43 +00:00
Andy Rothfusz 72660a1a2f Merge pull request #1537 from metalivedev/1517-sudodocker
Fix #1517, #1521 by adding sudo to examples and installation.
2013-08-14 16:34:00 -07:00
Andy Rothfusz d4eab77f0c Fix #1517, #1521 by adding sudo to examples and installation. 2013-08-14 16:21:36 -07:00
Michael Crosby 9708597b0b Merge pull request #1538 from KSid/bash-completion-limit-containers
Bash Completion: Limit commands to containers of a relevant state
2013-08-14 16:16:25 -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
Guillaume J. Charmes 631c449183 Merge pull request #1496 from xdissent/1351-volumes-from-before-volumes
* Runtime: Apply volumes-from before creating volumes
2013-08-14 15:10:41 -07: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
Guillaume J. Charmes 5ad8840024 Merge pull request #1541 from dotcloud/1528-fix_panic
prevent crash when .dockercfg not readable
2013-08-14 14:51:01 -07:00
Guillaume J. Charmes 8dfc47307d Merge pull request #1543 from dotcloud/fix_rmi_parse_repo_tag
add missing ParseRepositoryTag
2013-08-14 14:42:41 -07:00
shin- aae04def7b Merge branch 'master' of https://github.com/dotcloud/docker 2013-08-14 23:32:56 +02:00
Daniel Mizyrycki f51eb0e4b3 Merge pull request #1546 from dotcloud/1542-coverage-dependencies
testing, issue #1542: Add docker dependencies coverage testing into docker-ci
2013-08-14 14:32:15 -07:00
shin- 8b6b187a8d Merge branch 'master' of https://github.com/dotcloud/docker 2013-08-14 23:31:58 +02:00
shin- 8b26e4ea3c brew: docker-py requirement points to git repository 2013-08-14 23:31:18 +02:00
Daniel Mizyrycki 1d8562b290 testing, issue #1542: Add docker dependencies coverage testing into docker-ci 2013-08-14 14:27:46 -07:00
Michael Crosby 9662f9e56a Merge pull request #1478 from jpetazzo/929-insecure-flag
add -privileged flag and relevant tests, docs, and examples
2013-08-14 13:55:18 -07:00
Michael Crosby 25d71fb01b Merge pull request #1509 from dotcloud/1359-tar-pkg-ref
Add import for dotcloud/tar to replace std tar pkg
2013-08-14 11:26:49 -07:00
Joffrey F 12ffb522a6 Merge pull request #1519 from shin-/brew-more
Docker-brew 0.5.2 support and memory footprint reduction
2013-08-14 10:40:05 -07:00
Michael Crosby 0077678844 Merge pull request #1539 from fkautz/https-install-script
Install script should be fetched over https, not http.
2013-08-14 10:32:29 -07:00
Daniel Mizyrycki 53f2c5d6e8 Merge pull request #1545 from dotcloud/1544-docker-ci-dependencies
testing, issue #1544: Add new docker dependencies into docker-ci
2013-08-14 10:23:08 -07:00
Daniel Mizyrycki 49597f0f52 testing, issue #1544: Add new docker dependencies into docker-ci 2013-08-14 10:12:08 -07:00
Victor Vieux c84d74df8c add missing ParseRepositoryTag 2013-08-14 16:59:21 +00:00
Victor Vieux 3c9f9945c9 prevent crash when .dockercfg not readable 2013-08-14 10:26:18 +00:00
Frederick F. Kautz IV 80ebff0fa4 Install script should be fetched over https, not http. 2013-08-13 22:28:41 -07:00
Joffrey F 62c0f433fa brew: Fixed a bug with remote repository builds 2013-08-14 05:05:44 +02:00
Kawsar Saiyeed 44eb1b3892 Limit commands to containers of a relevant state 2013-08-14 02:45:03 +01:00
Andy Rothfusz 4cb57a5438 Merge pull request #1533 from dhrp/docs-ux-changes
Docs ux changes
2013-08-13 18:03:49 -07:00
Andy Rothfusz 2e5642452b Merge pull request #1523 from dotcloud/docker-group-docs
Update docs for docker group
2013-08-13 18:02:30 -07: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
Thatcher Peskens 6c87db97a6 Resolved conflict in conf.py
ps. also changed navigation (swapped community and getting started)
2013-08-13 16:28:24 -07:00
Thatcher Peskens f127c471a1 Merge remote-tracking branch 'dotcloud/master' into docs-smart-changes
Conflicts:
	docs/sources/conf.py
2013-08-13 16:25:58 -07:00
Jérôme Petazzoni 280901e5fb add -insecure flag and relevant tests 2013-08-13 16:20:22 -07:00
Thatcher Peskens f14db49346 [docs] Some user-friendly changes to the documentation.
- Added parmalinks (closes #1527)
 - Changed the 'fork us on github' button to 'Edit this page on github', so people can edit quickly (closes #1532)
- Changed the favicon
2013-08-13 16:18:32 -07:00
Michael Crosby f1cdba2937 Merge pull request #1516 from unclejack/up_hack_dockerfile_go_version_to_1.1.2
use Go 1.1.2 for dockerbuilder
2013-08-13 14:50:12 -07:00
Andy Rothfusz 0794f0b518 Merge pull request #1526 from metalivedev/1522-faqupdate
Added information about Docker's high level tools over LXC.
2013-08-13 13:57:47 -07:00
Andy Rothfusz e2409ad337 Added information about Docker's high level tools over LXC. Formatting cleanup. Mailing list cleanup. 2013-08-13 13:45:07 -07:00
Guillaume J. Charmes ca92bc7798 Merge pull request #1501 from KSid/vagrant-dev-dockerfile
Install websocket library before building docker
2013-08-13 12:16:30 -07:00
Michael Crosby e4f35dd4cf Update docs for docker group 2013-08-13 12:05:27 -07:00
shin- 2cebe09924 brew: Display a clear error message when the path is invalid 2013-08-13 20:28:15 +02:00
shin- e5f1b6b9a4 brew: Updated requirements 2013-08-13 20:13:39 +02:00
shin- 79fc90b646 brew: Don't build if docker daemon can't be reached 2013-08-13 20:13:39 +02:00
shin- fb7c4214ce brew: Reuse repositories when possible 2013-08-13 20:13:39 +02:00
Michael Crosby 06a092bdb5 Merge pull request #1510 from dotcloud/bump_0.5.3
Bump to 0.5.3
2013-08-13 10:41:57 -07:00
Michael Crosby 5d25f3232c Update changelog to include hostname commit 2013-08-13 17:36:24 +00:00
Guillaume J. Charmes 1a1c89556f Fix TestEnv 2013-08-13 17:34:35 +00:00
Nolan 05219d6b52 Add hostname to the container environment. 2013-08-13 17:30:21 +00:00
Guillaume J. Charmes 9cc3d7a18b Merge pull request #1515 from dotcloud/rework_auth_push
* Registry: Improve auth push
2013-08-13 10:15:59 -07:00
unclejack e09863fedb use Go 1.1.2 for dockerbuilder 2013-08-13 19:48:30 +03: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
Victor Vieux 5ee3c58d25 Add USER instruction 2013-08-13 12:02:17 +00:00
Michael Crosby c3773740d9 Bump to 0.5.3 2013-08-12 23:55:42 +00:00
Steeve Morin 0ca133dd76 Handle ip route showing mask-less IP addresses
Sometimes `ip route` will show mask-less IPs, so net.ParseCIDR will fail. If it does we check if we can net.ParseIP, and fail only if we can't.
Fixes #1214
Fixes #362
2013-08-12 23:46:26 +00:00
Guillaume J. Charmes 68934878f1 Make sure ENV instruction within build perform a commit each time 2013-08-12 23:43:53 +00:00
Michael Crosby ef1d1aefa7 Revert "docker.upstart: avoid spawning a sh process"
This reverts commit 24dd50490a.
2013-08-12 23:35:23 +00:00
Daniel Mizyrycki c015d26e96 API, issue 1471: Allow users belonging to the docker group to use the docker client 2013-08-12 23:33:42 +00:00
Guillaume J. Charmes f6760fca88 Merge pull request #1485 from dotcloud/1471-unixsocket-group
* Runtime: API, issue 1471: Use groups for socket permissions
2013-08-12 16:21:53 -07:00
Michael Crosby ec61c46bf7 Add import for dotcloud/tar to replace std tar pkg 2013-08-12 22:42:29 +00:00
Andy Rothfusz 90cb66f08d Merge pull request #1508 from pborreli/typos
Fixed typos
2013-08-12 15:17:02 -07: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
Andy Rothfusz 13acf72a3e Merge pull request #1504 from zaiste/docs/postgresql-service
docs/postgresql: PostgreSQL service on Docker example
2013-08-12 14:47:19 -07:00
Solomon Hykes aa213b48a4 Merge pull request #1488 from KSid/336-bash-completion
* Contrib: bash completion script
2013-08-12 11:50:25 -07:00
Pascal Borreli 9b2a5964fc Fixed typos 2013-08-12 18:53:06 +01:00
Guillaume J. Charmes 1110bb8e98 Merge pull request #1476 from dotcloud/improve_TestKillDifferentUser
* Tests: Improve TestKillDifferentUser to prevent timeout on buildbot
2013-08-12 10:23:08 -07:00
Victor Vieux 168e2f8c49 Merge pull request #1491 from titanous/gitignore-test
gitignore all test files
2013-08-12 09:18:31 -07:00
Michael Crosby 86ef6422f3 Merge pull request #1487 from titanous/maintainer-usernames
Add GitHub usernames to MAINTAINERS
2013-08-12 09:07:10 -07:00
Zaiste! 3af60bf375 fix/docs: ubuntu instead of base, note about root-only 2013-08-12 15:30:52 +02:00
Victor Vieux 123c80467b Added docs 2013-08-12 11:55:23 +00:00
Ken Cochrane edba1af304 Merge pull request #1494 from KSid/typo-docs-run-command
* Documentation: Fix typo in docs for docker run -dns
2013-08-12 04:51:56 -07:00
Ken Cochrane 875e16c11b Merge pull request #1499 from seldo/master
* Documentation: Adding a reference to ps -a
2013-08-12 04:51:17 -07:00
Victor Vieux 703905d7ec ensure the use oh IDs and add image's name in /events 2013-08-12 11:50:03 +00:00
Zaiste! d52c149075 docs/postgresql: PostgreSQL service on Docker example 2013-08-12 12:03:43 +02:00
Victor Vieux 3f95d1b9bf Merge pull request #1497 from vincentbernat/fix/ipv4-forwarding-detection
runtime: correctly detect IPv4 forwarding
2013-08-12 02:07:03 -07:00
Kawsar Saiyeed def9598ed9 Install websocket library before building docker 2013-08-12 05:22:33 +01:00
Laurie Voss 529ee848da Adding a reference to ps -a
It was confusing to me as a first-time user that my docker attach command failed; I was expecting the container to run continuously, and when I couldn't attach to it, I assumed something was wrong. ps -a shows that the container still exists, which gives the user confidence to go to the next step.
2013-08-11 17:27:47 -07:00
Vincent Bernat 64b817a5c1 runtime: correctly detect IPv4 forwarding
When memory cgroup is absent, there was not attempt to detect if IPv4
forwarding was enabled and therefore, docker was printing a warning
for each command spawning a new container. The test for IPv4
forwarding was guarded by the test for memory cgroup.
2013-08-11 11:52:16 +02:00
Brandon Liu 02b8d14bdd Add test case for Graph ByParent(). 2013-08-11 01:24:21 -07:00
Brandon Liu 025c759e44 Fix Graph ByParent() to generate list of child images per parent image. 2013-08-11 00:37:16 -07:00
Michael Crosby 940d58806c Merge pull request #1483 from titanous/update-authors
Update AUTHORS
2013-08-10 21:16:34 -07:00
Kawsar Saiyeed a2fb870ce3 Fix typo in docs for docker run -dns 2013-08-11 02:04:04 +01:00
Kawsar Saiyeed e737856a7f Still missed -entrypoint from 'docker run' 2013-08-11 01:29:22 +01:00
Kawsar Saiyeed ae1909b482 Clarified bash completion limitations 2013-08-11 01:08:47 +01:00
Kawsar Saiyeed d75282eb14 Missed -entrypoint from 'docker run' options 2013-08-11 00:57:18 +01:00
Daniel Mizyrycki cd9886f0a8 Merge pull request #1489 from dotcloud/1422-revert-upstart
Revert "docker.upstart: avoid spawning a `sh` process"
2013-08-10 11:07:21 -07:00
Jonathan Rudenberg a43bae4c0b gitignore all test files 2013-08-10 13:48:24 -04:00
Kawsar Saiyeed 91ae135896 Add description and usage information 2013-08-10 13:05:31 +01:00
Greg Thornton 57b49efc98 Skip existing volumes in volumes-from
Removes the error when a container already has a volume that would otherwise
be created by `Config.VolumesFrom`. Allows restarting containers with a
`Config.VolumesFrom` set.
2013-08-10 06:37:57 +00:00
Greg Thornton 3bd73a9633 Apply volumes-from before creating volumes
Copies the volumes from the container specified in `Config.VolumesFrom` before
creating volumes from `Config.Volumes`. Skips any preexisting volumes when
processing `Config.Volumes`. Fixes #1351
2013-08-10 04:55:23 +00:00
Michael Crosby e3acbff2ed Revert "docker.upstart: avoid spawning a sh process"
This reverts commit 24dd50490a.
2013-08-10 03:06:08 +00:00
Kawsar Saiyeed d6e5c2c276 Add initial bash completion script
The script can be used to auto-complete commands, image names and
container ids from within a bash prompt.

This partially resolves #336.
2013-08-10 02:38:11 +01:00
Jonathan Rudenberg 4dc04d7690 Add GitHub usernames to MAINTAINERS 2013-08-09 21:16:44 -04: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
Michael Crosby 3d63087f78 Merge pull request #1481 from titanous/fix-sprint
Fix typo: fmt.Sprint -> fmt.Sprintf
2013-08-09 17:28:59 -07:00
Jonathan Rudenberg 1408f08c40 Update AUTHORS 2013-08-09 20:09:42 -04:00
Jonathan Rudenberg 3b23f02229 Fix typo: fmt.Sprint -> fmt.Sprintf 2013-08-09 19:52:05 -04:00
Guillaume J. Charmes fd5099c9fe Merge pull request #1479 from jpetazzo/fix-testbindmounts-typo
- Tests: fix typo in TestBindMounts (runContainer called without image)
2013-08-09 16:20:24 -07:00
Jérôme Petazzoni 68b09cbe3d fix typo in TestBindMounts (runContainer called without image) 2013-08-09 16:03:05 -07: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
Guillaume J. Charmes 8d1cd63dfa Merge pull request #1460 from dotcloud/patch1
* Runtime: Mount /dev/shm as a tmpfs
2013-08-09 15:18:22 -07:00
Michael Crosby 2c4c10fb4a Merge pull request #1477 from kevinclark/builder-fixme
Only count known instructions as build steps
2013-08-09 14:45:06 -07:00
Kevin Clark 722d4e916a Add myself to AUTHORS 2013-08-09 14:39:03 -07:00
Kevin Clark 4ff649a4ea Only count known instructions as build steps
stepN is only used in the log line, so if we only produce the log line
when there's a message, it should do the right thing.

If it's *not* a valid instruction, it gets a line as well, so there's no
reason to double up.
2013-08-09 14:38:29 -07: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
Michael Crosby 25e7227c81 Merge pull request #1462 from dotcloud/fix_build_events_output
Fix docker build and docker events output
2013-08-09 12:41:18 -07:00
Jérôme Petazzoni 04cd0a392b Merge pull request #1463 from jpetazzo/https-get-docker-io
switch from http to https for get.docker.io
2013-08-09 11:26:56 -07:00
Guillaume J. Charmes db9d68c3e4 Improve TestKillDifferentUser to prevent timeout on buildbot 2013-08-09 10:50:58 -07:00
unclejack 88cb9f3116 keep processing signals after the first one 2013-08-09 20:33:17 +03:00
Guillaume J. Charmes 55f9610cde Merge pull request #1452 from dotcloud/improve_TestGetContainersTop
* Tests: Improve TestGetContainersTop so it does not rely on sleep
2013-08-09 10:28:34 -07:00
shin- 6178dc7f1b brew: added safeguards in script and changed default branch to 'master' 2013-08-09 16:40:28 +02:00
Solomon Hykes b8f8f9d07e Merged 0.5.2 hotfix release back to master 2013-08-08 19:45:57 -07:00
Michael Crosby 1643943402 Merge pull request #1464 from dotcloud/bump_0.5.2
Bump to 0.5.2
2013-08-08 17:36:53 -07:00
Michael Crosby e99a99eb6e Bump to v0.5.2 2013-08-09 00:17:35 +00:00
Michael Crosby df9712f1c8 Change daemon to listen on unix socket by default
Conflicts:
	docs/sources/api/docker_remote_api.rst
2013-08-09 00:16:43 +00: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
Jérôme Petazzoni 1ce9b3ca9c switch from http to https 2013-08-08 17:02:59 -07:00
Jérôme Petazzoni 5c56b597a9 change network range to avoid conflict with EC2 DNS 2013-08-08 23:27:55 +00:00
Michael Crosby f712e10cb2 Forbid certain paths within docker build ADD
Conflicts:
	buildfile_test.go
2013-08-08 23:22:14 +00:00
Victor Vieux 213365c2d2 fix docker build and docker events output 2013-08-08 22:51:39 +00:00
Sam Alba 7f02bd3b7a Merge pull request #1361 from dotcloud/library
Docker-brew and Docker standard library
2013-08-08 14:22:20 -07:00
Guillaume J. Charmes ceb33818cd Improve TestGetContainersTop so it does not rely on sleep 2013-08-08 11:51:31 -07:00
Guillaume J. Charmes 18fc707fdf Make sure all needed mountpoint are present 2013-08-08 11:25:02 -07:00
Michael Crosby c3027fa9ac Merge pull request #1216 from dotcloud/add_some_tests
Add some tests in server and utils
2013-08-08 09:57:18 -07:00
Victor Vieux 4249867e5b rebase 2013-08-08 14:58:52 +00:00
Victor Vieux c804a5f827 rebase master 2013-08-08 14:56:37 +00:00
Victor Vieux be77ee33bc Merge branch 'master' into add_some_tests 2013-08-08 14:44:56 +00:00
Victor Vieux 5928ed5d45 Merge pull request #1456 from dotcloud/1455-force_commit_build_env
Make sure ENV instruction within build perform a commit each time
2013-08-08 07:37:51 -07:00
Karan Lyons 075d30dbce Mount /dev/shm as a tmpfs
Fixes #1122.
2013-08-07 17:44:33 -07:00
Guillaume J. Charmes 6a6a2ad8a4 Make sure ENV instruction within build perform a commit each time 2013-08-07 17:23:49 -07:00
Guillaume J. Charmes 279fe144e1 Merge pull request #1420 from jpetazzo/fix-get-docker-io-upstart-script
* Packaging: Fix the upstart script generated by get.docker.io
2013-08-07 17:13:54 -07:00
Daniel Mizyrycki cc80bd41c4 Merge pull request #1423 from krautcomputing/fix_indentation_in_vagrantfile
Fix indentation in Vagrantfile
2013-08-07 17:10:40 -07:00
Andy Rothfusz 06183e6cdc Merge pull request #1447 from kermit666/image-tag-doc
doc: syntax to run a specific image tag
2013-08-07 16:23:45 -07: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
Solomon Hykes 80f34c6aeb Merge pull request #1451 from dotcloud/michael-maintainer
Add Michael Crosby to core maintainers
2013-08-07 15:53:29 -07:00
Guillaume J. Charmes a2f526dadc Merge pull request #1435 from jpetazzo/userland-proxy-should-listen-on-inaddr-any
* Runtime: Let userland proxy handle container-bound traffic
2013-08-07 15:48:17 -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
Guillaume J. Charmes 2ca018b2eb Merge pull request #1395 from c00w/490-warn-ipv4forwarding-disabled
* Runtime: Add warning when net.ipv4.ip_forwarding = 0
2013-08-07 15:31:12 -07:00
Guillaume J. Charmes 3e6e08ce00 Merge pull request #1362 from dotcloud/registry_test
* Registry: Registry unit tests + mock registry
2013-08-07 15:30:07 -07:00
Colin Rice 3e491f8698 Fix reversed IPv4Forwarding check in api.go 2013-08-07 18:28:40 -04:00
Colin Rice ccffa69766 Add Colin Rice to AUTHORS file 2013-08-07 18:28:39 -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
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
Guillaume J. Charmes e63960caae Merge pull request #1450 from dotcloud/add-sandbox
- Builder: Forbid certain paths within docker build ADD
2013-08-07 15:04:36 -07:00
benoitc e2ca600fd8 Merge branch 'feature/attach_ws' into feature/attach_ws2
Conflicts:
	api.go
2013-08-07 23:30:28 +02:00
Solomon Hykes 4860df1689 Add Michael Crosby to core maintainers 2013-08-07 21:24:41 +00:00
Michael Crosby ced93bcabd Modify test to accept error from mkContainer 2013-08-07 19:07:39 +00:00
Sean P. Kane 0e21de9a25 Assume that if VAGRANT_DEFAULT_PROVIDER is set we shouldn't install vbox tools 2013-08-07 09:38:49 -07:00
Michael Crosby 3104fc8d33 Forbid certain paths within docker build ADD 2013-08-07 16:05:30 +00:00
Victor Vieux 2409df9285 Merge pull request #1434 from jpetazzo/fix-ec2-dns-conflict
change network range to avoid conflict with EC2 DNS
2013-08-07 08:43:53 -07:00
Victor Vieux 2e37be973f Merge pull request #1436 from jpetazzo/fix-loopback-interface-test-index
relax the lo interface test to allow iface index != 1
2013-08-07 08:40:55 -07:00
Dražen Lučanin 6115348dd9 doc: syntax to run a specific image tag 2013-08-07 13:57:31 +02: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
Andy Rothfusz 3782e34e67 Merge pull request #1430 from metalivedev/1031-linuxheaders
Suggest installing linux-headers by default. Address #1187 and #1031
2013-08-06 18:56:34 -07:00
Jérôme Petazzoni 84790aafd8 relax the lo interface test to allow iface index != 1 2013-08-06 18:31:05 -07:00
Jérôme Petazzoni fea2d5f2fe Let userland proxy handle container-bound traffic 2013-08-06 17:44:39 -07:00
Jérôme Petazzoni 9f1c9686e0 change network range to avoid conflict with EC2 DNS 2013-08-06 17:24:10 -07:00
Andy Rothfusz e0a6f27d1b Suggest installing linux-headers by default. Address #1187 and #1031 2013-08-06 13:56:29 -07:00
Andy Rothfusz 9130ee7513 Merge pull request #1428 from dhrp/twitterhandle
changed the twitter handle
2013-08-06 13:38:22 -07:00
shin- 65c8e9242c brew: added support for push on private registries. 2013-08-06 21:08:27 +02:00
Thatcher Peskens 1d654f6156 changed the twitter handle 2013-08-06 11:40:16 -07:00
Victor Vieux 4af24e11a4 Merge pull request #1221 from crosbymichael/cmd-cp
*Client: Add docker cp command and copy api endpoint to copy container files/folders to the host
2013-08-06 09:15:39 -07:00
Michael Crosby 583f5868c9 Move copy command docs to api 1.4 document 2013-08-06 16:09:54 +00: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
Victor Vieux 0dbc51f4d2 Merge pull request #1394 from crosbymichael/1391-json-requests
Use mime pkg to parse Content-Type
2013-08-06 08:59:10 -07: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
Manuel Meurer b9149f45bf Fix indentation in Vagrantfile 2013-08-06 15:21:26 +02:00
Victor Vieux b6c4b325a4 Merge pull request #1406 from dotcloud/1363-reduce_timeout-fix
Reduce connect and read timeout when pinging the registry (fixes issue #1363)
2013-08-06 04:22:44 -07: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
Michael Crosby c7c2399be9 Merge pull request #1421 from dotcloud/fix_makefile
Make sure all sources have the wanted revision
2013-08-05 20:25:32 -07:00
Guillaume J. Charmes 120a520a22 Make sure all sources have the wanted revision 2013-08-05 19:58:48 -07:00
Andy Rothfusz 7c03bd1e7a Merge branch 'docs-example-fix' of git://github.com/faizkhan00/docker
merges #1402
2013-08-05 18:21:19 -07:00
Jérôme Petazzoni 049d28868e fix the upstart script generated by get.docker.io (it was not starting dockerd on boot) 2013-08-05 18:11:13 -07:00
Michael Crosby 8934f13615 Change daemon to listen on unix socket by default 2013-08-06 00:12:56 +00:00
Guillaume J. Charmes dcf9dfb129 Update utils_test.go 2013-08-05 16:32:25 -07:00
Andy Rothfusz 7c9604e32b Merge pull request #1387 from joevandyk/patch-1
Update amazon.rst to explain that Vagrant is not necessary for running Docker on ec2
2013-08-05 16:14:57 -07:00
Andy Rothfusz b302ae329c Merge pull request #1418 from dhrp/remote_api_doc_improvements
Fixed some typo's and formatting issues in remote api documentation.
2013-08-05 16:13:55 -07:00
Thatcher Peskens ff6b6f2ce1 Fixed some typo's and formatting issues in remote api documentation. 2013-08-05 15:55:40 -07:00
Thatcher d49f141fb3 Merge pull request #1303 from dhrp/update-spinx-for-man
Enabled the docs to generate manpages.
2013-08-05 15:31:51 -07:00
Guillaume J. Charmes 590fc58de7 Update version. 2013-08-05 14:49:37 -07:00
Guillaume J. Charmes c03561eea8 Update CHANGELOG.md 2013-08-05 14:32:54 -07:00
Nan Monnand Deng 4179f25286 fixed #910. print user name to docker info output 2013-08-05 17:25:29 -04:00
Guillaume J. Charmes e54e8fa920 Merge pull request #1290 from dotcloud/parallel_pull
* Runtime: Parallel pull
2013-08-05 14:17:29 -07:00
Guillaume J. Charmes 2f1c05d997 Merge pull request #1374 from dotcloud/steeve-patch-1
- Runtime: Handle ip route showing mask-less IP addresses
2013-08-05 14:13:20 -07:00
Andy Rothfusz baa4618e57 Merge pull request #1390 from grobie/clarify-amazon-documentation
Clarify Amazon EC2 installation type
2013-08-05 13:26:28 -07:00
Andy Rothfusz dcc1e3562f Merge pull request #1404 from dnordberg/fix-base-refs
'Base' image is depreciated and should no longer be referenced in the docs.
2013-08-05 13:24:05 -07:00
Guillaume J. Charmes f6fa353dd8 Merge pull request #1267 from sridatta/new-clean-init
* Runtime: Fix to "Inject dockerinit at /.dockerinit"
2013-08-05 13:23:22 -07:00
Andy Rothfusz d4fa619ed1 Merge pull request #1411 from andrewmacgregor/doc-typos
Minor typos found while reading docs
2013-08-05 13:22:53 -07:00
Michael Crosby 8a851af5e6 Merge pull request #1364 from dotcloud/bump_0.5.1
Bump to v0.5.1
2013-08-05 12:10:03 -07:00
shin- 8aa9985ad0 Adapted tests to latest registry changes 2013-08-05 20:28:05 +02:00
shin- 2c85b964e3 Cleanup 2013-08-05 19:07:23 +02:00
shin- 9159c819c3 Mock access logs don't show up in non-debug mode 2013-08-05 19:06:00 +02:00
shin- 484ba4a8c5 gofmt 2013-08-05 19:06:00 +02:00
shin- 97b7b173b9 New registry unit tests remade from scratch, using the mock registry 2013-08-05 19:06:00 +02:00
shin- 29f69211c9 Mock registry: Fixed a bug where the index validation path would return a 200 status code instead of the expected 204 2013-08-05 19:06:00 +02:00
shin- 553ce165c1 registry: Fixed a bug where token and cookie info wouldn't be sent when using LookupRemoteImage(). Fixed a bug where no error would be reported when getting a non-200 status code in GetRemoteImageLayer() 2013-08-05 19:05:14 +02:00
Sam Alba 310ddec823 Disabled test server in the tests 2013-08-05 19:02:57 +02:00
Sam Alba 6926ba558f Mocked registry: Added X-Docker-Size when fetching the layer 2013-08-05 19:02:57 +02:00
Sam Alba 97d1d6f5d2 Fixed mocked registry 2013-08-05 19:02:57 +02:00
Sam Alba 5f7abd5347 Implemented a Mocked version of the Registry server 2013-08-05 19:02:57 +02:00
Victor Vieux 946bbee39a rebase master 2013-08-05 16:25:42 +00:00
Victor Vieux bdc0e8f825 Merge pull request #1405 from jonasi/entrypoint-noargs
*Runtime: Allow ENTRYPOINT without CMD
2013-08-05 09:00:39 -07:00
Victor Vieux 1b08ab92d1 Merge pull request #1408 from dotcloud/1407-localhost_is_a_domain-fix
Always consider localhost as a domain name when parsing the FQN repos name
2013-08-05 08:50:12 -07: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
Andrew Macgregor ce97a71adf Minor typos found while reading docs 2013-08-05 22:47:16 +08:00
Isao Jonas d00fb40967 added tests for 1405 2013-08-05 09:30:27 -05:00
Isao Jonas 0f249c85ea fix entrypoint without cmd 2013-08-05 09:07:03 -05:00
Ken Cochrane a37b42b57c Merge pull request #1400 from gorsuch/doc-typo
* Documentation: fix a typo in the ubuntu installation guide
2013-08-05 07:05:27 -07:00
Victor Vieux dd8c59892c Merge pull request #1182 from dotcloud/change_build_usage
change tag -> repository name (and optionally a tag) in build usage
2013-08-05 04:08:33 -07:00
Victor Vieux a97cf23355 add docs 2013-08-05 11:07:27 +00:00
Victor Vieux 030cc8d5cc Merge pull request #1389 from dotcloud/1373-improve_checklocaldns
Consider empty /etc/resolv.conf as local dns + add unit test
2013-08-05 02:29:36 -07:00
Sam Alba c22f2617ad Always consider localhost as a domain name when parsing the FQN repos name 2013-08-04 17:59:12 -07:00
Sam Alba c860945be2 Reduce connect and read timeout when pinging the registry (fixes issue #1363) 2013-08-04 17:42:24 -07:00
Daniel Nordberg 51d0c9238b 'Base' is depreciated and should no longer be referenced in the docs.
https://groups.google.com/forum/\#!topic/docker-club/pEjqMgcrnqA
2013-08-05 01:34:32 +03:00
Faiz K 22df1249b5 bash commands while in the container aren't in the transcript! Added. 2013-08-04 08:26:56 -05:00
David Calavera bdaa87ff21 Print a new line after getting the password from stdin. 2013-08-03 21:30:07 -07:00
Michael Gorsuch db0ccaac9b typo: s/connexions/connections 2013-08-03 22:11:59 -05:00
David Calavera 4089a20cf4 Exit if there is any error reading from stdin. 2013-08-03 17:27:15 -07:00
David Calavera 75ac50a9a0 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-03 16:43:20 -07:00
David Calavera 58e0c68132 Merge branch 'master' into login_signal
* master: (54 commits)
  Return JSONError for HTTPResponse error
  Fix TestEnv
  Revert "Bind daemon to 0.0.0.0 in Vagrant. Fixes #1304"
  Add unit tests for build no cache
  Add no cache for docker build
  Move note about officially supported kernel
  Solved the logo being squished in Safari
  Add hostname to the container environment.
  fix same issue in api.go
  improve tests
  Return registy status code in error
  update http://get.docker.io/latest
  Add check that the request is good
  fix tests about refactor checksums
  add ufw doc
  Fixed a couple of minor syntax errors.
  Updated the description of run -d
  Make sure the index also receives the checksums
  Switch json/payload order
  Remove unused parameter
  ...
2013-08-03 15:43:43 -07:00
David Calavera cd6aeaf979 Sort APIImages by most recent creation date.
Fixes #985.
2013-08-03 15:35:36 -07:00
Tobias Schmidt 708cd34586 Clarify Amazon EC2 installation type
Make clear this documentation is about installing docker on EC2 with the
help of vagrant, which doesn't make it easy to start multiple instances,
instead of plain vanilla EC2 installation.
2013-08-03 17:31:20 +07: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
Andy Rothfusz b1d994e3b9 Merge pull request #1375 from grobie/patch-1
Move note about officially supported kernel
2013-08-02 17:24:15 -07:00
Guillaume J. Charmes dde8f74cea Fix TestEnv 2013-08-02 15:58:10 -07:00
Daniel Mizyrycki 9e3d18e606 Merge pull request #1388 from titanous/revert-vagrant-bind
Revert "Bind daemon to 0.0.0.0 in Vagrant. Fixes #1304"
2013-08-02 15:26:05 -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
Jonathan Rudenberg 07fee44559 Revert "Bind daemon to 0.0.0.0 in Vagrant. Fixes #1304"
This reverts commit bdc79ac8b2.
2013-08-02 19:18:02 -03:00
Joe Van Dyk b6bff0cbb1 Update amazon.rst to explain that Vagrant is not necessary for running Docker on ec2 2013-08-02 15:10:57 -07: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
Guillaume J. Charmes 29de2432ea Merge pull request #1350 from ndarilek/1348-add-hostname-to-environment
Runtime: add hostname to environment
2013-08-02 13:58:43 -07:00
Guillaume J. Charmes ffcba1236c Merge pull request #1117 from dotcloud/add_last_version-feature
Add last stable version in `docker version`
2013-08-02 13:53:33 -07:00
Guillaume J. Charmes 0f088d28c5 Merge pull request #1336 from dotcloud/fix_ADD_permissions
Builder: Make sure ADD will create everything in 0755
2013-08-02 13:52:19 -07:00
Daniel Mizyrycki 16917275ee Merge pull request #1346 from dotcloud/1117-update_latest_in_dockerbuilder
update http://get.docker.io/latest
2013-08-02 13:51:23 -07:00
Andy Rothfusz 09ab2bfa1d Merge pull request #1343 from dotcloud/ufw_doc
Add ufw doc
2013-08-02 13:33:26 -07:00
Michael Crosby b9f0695924 Add unit tests for build no cache 2013-08-02 19:12:38 +00:00
Nan Monnand Deng 7bade49d4c update auth_test.go 2013-08-02 14:08:16 -04: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 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
Nan Monnand Deng 7dac26ce69 reqFactory in Registry 2013-08-02 03:08:08 -04:00
Nan Monnand Deng 793fd983ef http utils 2013-08-02 02:47:58 -04:00
Tobias Schmidt 2424480e2c Move note about officially supported kernel
It seems this a general note about kernel issues and not specific to Cgroups or namespaces.
2013-08-02 12:24:38 +07:00
Guillaume J. Charmes f5a8e90d10 Make sure the routes IP are taken into consideration + add unit test for network overlap detection 2013-08-01 18:12:39 -07:00
Daniel Mizyrycki 2e7df5182c testing, issue #1331: Add registry functional test to docker-ci 2013-08-01 17:48:17 -07:00
Daniel Mizyrycki ea2486d631 Merge pull request #1333 from dotcloud/1331-testing-registry
testing, issue #1331: Add registry functional test to docker-ci
2013-08-01 16:00:29 -07:00
Steeve Morin 2e72882216 Handle ip route showing mask-less IP addresses
Sometimes `ip route` will show mask-less IPs, so net.ParseCIDR will fail. If it does we check if we can net.ParseIP, and fail only if we can't.
Fixes #1214
Fixes #362
2013-08-01 02:42:22 +02:00
Thatcher d1e1a8e78c Merge pull request #1365 from dhrp/solve-logo-squish
Solved the logo being squished in Safari
2013-07-31 15:06:26 -07:00
Thatcher ad3b091d53 Some more improvements on the docs readme. Removed references to website. 2013-07-31 13:59:56 -07:00
Thatcher Peskens 26229d78f2 Updated docs README with instructions to preview the generated manfile, and where to get the one generated by sphinx. 2013-07-31 13:44:10 -07:00
Thatcher Peskens e0c24ccfc3 Solved the logo being squished in Safari 2013-07-31 12:17:42 -07: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
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
Nolan 9a604acc23 Add hostname to the container environment. 2013-07-31 09:50:53 -05:00
Victor Vieux cd9f7f29d1 Merge pull request #1334 from dotcloud/1314-compat_broke-fix
Discard error when loading old container format
2013-07-31 01:08:08 -07:00
Victor Vieux a7068510a5 fix same issue in api.go 2013-07-31 08:01:20 +00:00
Victor Vieux 73c6d9f135 improve tests 2013-07-31 07:56:53 +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 e66e0289ab update http://get.docker.io/latest 2013-07-30 17:18:19 +00:00
Victor Vieux 6166380d76 rebase master 2013-07-30 16:51:50 +00:00
Victor Vieux e4752c8c1a Add check that the request is good 2013-07-30 16:42:32 +00:00
Victor Vieux 99c27fa0dd Merge branch 'master' into add_last_version-feature 2013-07-30 16:23:06 +00:00
Victor Vieux d5a57a4b5e Merge pull request #1344 from dotcloud/refactor_checksum_tests
fix tests about refactor checksums
2013-07-30 06:13:49 -07:00
Victor Vieux b14c251862 fix tests about refactor checksums 2013-07-30 13:13:18 +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 16225c473f Merge pull request #1291 from dotcloud/ensure_mount_commit
*Builder: Allow the commit of a non-started container
2013-07-30 05:19:17 -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 dd2f0d89bf Merge pull request #1238 from dotcloud/1237-improve_docker_top-feature
*Client: add ps args to docker top
2013-07-30 04:54:44 -07:00
Victor Vieux 0b57e4483a Merge branch 'master' into 1237-improve_docker_top-feature 2013-07-30 11:51:16 +00:00
Victor Vieux 7d0b8c726c add ufw doc 2013-07-30 13:47:29 +02:00
Victor Vieux f2dc49292f Merge pull request #1342 from dsissitka/patch-4
Fixed a couple of minor syntax errors.
2013-07-30 04:20:05 -07:00
Victor Vieux a7ace535c3 Merge pull request #1339 from dhrp/docker-run-d-description
Updated the description of run -d
2013-07-30 04:15:41 -07: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
Victor Vieux c06aa62bda Merge pull request #1306 from dotcloud/1294_fix_wrong_untag_using_id_rmi
Fix wrong untag using id rmi
2013-07-30 04:09:55 -07:00
dsissitka 9ba998312d Fixed a couple of minor syntax errors. 2013-07-30 01:39:29 -04:00
Daniel Mizyrycki 7d68afb2d2 Merge pull request #1209 from zimbatm/upstart-improvements
Upstart improvements
2013-07-29 18:28:40 -07:00
Daniel Mizyrycki bfdf1839e0 Merge pull request #1312 from titanous/vagrant-bind
Bind daemon to 0.0.0.0 in Vagrant
2013-07-29 17:06:37 -07:00
Thatcher Peskens 5dc86d7bca Updated the description of run -d
The goal is to make it more clear this will give you the container id after run completes.

Since stdout is now standard on run, "docker run -d" is the best (or only) way to get the container ID returned from docker after a plain run, but the description (help) does not hint any such thing.
2013-07-29 14:17:15 -07:00
Guillaume J. Charmes f35491190a Merge pull request #1233 from fmd/1136-environment-variables
+ Builder: CmdAdd and CmdEnv now respect Dockerfile-set ENV variables
2013-07-29 13:43:13 -07:00
Guillaume J. Charmes 5b27652ac6 Make sure the index also receives the checksums 2013-07-29 11:30:21 -07:00
Guillaume J. Charmes 394941b6b0 Switch json/payload order 2013-07-29 11:30:17 -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
David Calavera 10e37198aa Keep the loop to allow resizing more than once. 2013-07-29 11:13:59 -07:00
Guillaume J. Charmes f7542664e3 Make sure ADD will create everything in 0755 2013-07-29 11:03:09 -07:00
Guillaume J. Charmes 950d0312dc Merge pull request #1322 from calavera/prompt_without_defaults
Do not show empty parenthesis if the default configuration is missing.
2013-07-29 10:53:43 -07:00
David Calavera c8ec36d1b9 Remove unnecessary signal conditional. 2013-07-29 10:28:41 -07:00
Daniel Mizyrycki 17ffb0ac84 testing, issue #1331: Add registry functional test to docker-ci 2013-07-29 09:45:19 -07:00
Victor Vieux b2aa877bf0 fix #1314 discard error when loading old container format 2013-07-29 16:40:35 +00:00
Victor Vieux bb241c10e2 add regression tests 2013-07-29 12:16:14 +00:00
Victor Vieux 3852d05990 add ParseRepositoryTag tests 2013-07-29 12:16:01 +00:00
Victor Vieux 63876e7dbd use ParseRepositoryTag instead on split on : in imagedelete 2013-07-29 12:15:27 +00:00
Solomon Hykes 97a2dc96f2 Remove deprecated copy from README 2013-07-28 12:57:09 -07:00
David Calavera 88b6ea993d Remove unused argument. 2013-07-27 10:17:57 -07:00
David Calavera d4f7039793 Do not show empty parenthesis if the default configuration is missing. 2013-07-27 10:00:36 -07:00
David Calavera bb06fe8dd9 Allow to generate signals when termios is in raw mode. 2013-07-27 09:14:38 -07:00
Guillaume J. Charmes 4399f65fb8 Merge pull request #1318 from gaffo/compile_docs
Add required go version for compilation
2013-07-26 18:33:10 -07:00
Mike Gaffney 2d85a20c71 Add required go version for compilation 2013-07-26 18:29:27 -07:00
David Calavera 7cc90f2bc5 Use a more idiomatic syntax to capture the exit. 2013-07-26 18:12:05 -07:00
David Calavera 01ce312c2d Exit from docker login on SIGTERM and SIGINT.
Fixes #1299.
2013-07-26 17:40:45 -07:00
Guillaume J. Charmes c01d17d77d Merge pull request #1313 from titanous/update-authors
Update AUTHORS
2013-07-26 17:04:05 -07:00
Guillaume J. Charmes ed0ba04da6 Merge pull request #1316 from dotcloud/1295-mkdir_ADD_issue
- Builder: Create directories with 755 instead of 700 within ADD instruction
2013-07-26 15:12:45 -07:00
Guillaume J. Charmes b15cfd3530 - Builder: Create directories with 755 instead of 700 within ADD instruction 2013-07-26 14:57:16 -07:00
Guillaume J. Charmes a438d505ba Merge pull request #1272 from dotcloud/improve_registry_cookie
Make sure the cookie is used in all registry queries
2013-07-26 14:26:29 -07:00
Jonathan Rudenberg 5eb590e79d Update AUTHORS 2013-07-26 15:48:01 -04:00
Jonathan Rudenberg bdc79ac8b2 Bind daemon to 0.0.0.0 in Vagrant. Fixes #1304 2013-07-26 15:45:00 -04:00
Solomon Hykes a97d858b2a Clean up 'manifesto' in docs 2013-07-26 10:21:17 -07:00
Victor Vieux e592f1b298 add regression test 2013-07-26 10:30:36 +00:00
Victor Vieux 513a567483 fix docs 2013-07-26 10:04:46 +00:00
Victor Vieux faf103e6ec Merge pull request #1305 from gaffo/fix-spelling
Change reserve-compatibility to reverse-compatibility
2013-07-26 02:40:56 -07:00
Victor Vieux e608296bc6 fix wrong untag when using rmi via id 2013-07-26 09:19:26 +00:00
Mike Gaffney 4ebe2cf348 Change reserve-compatibility to reverse-compatibility 2013-07-26 01:10:42 -07:00
Thatcher Peskens f4b63d9eea Enabled the docs to generate manpages.
* changed conf.py to reference toctree.rst instead of index
* Added note to README to upgrade your sphinx to the latest version to prevent a bug with .. note:: blocks.
2013-07-25 17:19:58 -07:00
Andy Rothfusz 422378cb85 Merge pull request #1274 from dhrp/headings_website
Removed website and updated headings.
2013-07-25 16:43:27 -07:00
Guillaume J. Charmes 594c818d85 Merge pull request #1281 from dotcloud/505-output_after_pipe-fix
- Runtime: Fixes #505 - Make sure all output is send on the network before closing
2013-07-25 13:01:31 -07:00
Fareed Dudhia d86898b014 Fixes 1136; Reopened from 1175 with latest changes. 2013-07-25 19:45:49 +00:00
Guillaume J. Charmes be087c9c82 Merge pull request #1293 from dotcloud/585_use_0755_instead_of_0700
use 0755 instead of 0700
2013-07-25 12:40:44 -07:00
Guillaume J. Charmes 9cc8b72a38 Merge pull request #1288 from dlintw/1286-improve-import-txz-description
Fixes #1286 improve-import-txz-description
2013-07-25 12:37:37 -07:00
Guillaume J. Charmes 3425c1b84c Make sure the cookie is used in all registry queries 2013-07-25 12:31:23 -07:00
shin- 12d575a6b1 Script cleans up downloaded repos, uses quiet build 2013-07-25 21:00:36 +02:00
Victor Vieux 1c509f4350 use 0755 instead of 0700 2013-07-25 15:45:15 +00:00
Victor Vieux 48833c7b07 add regression test + go fmt 2013-07-25 15:20:56 +00:00
Victor Vieux f385f1860b ensure mount in commit 2013-07-25 15:18:34 +00:00
Victor Vieux 01e98bf0dd fix errors 2013-07-25 14:32:46 +00:00
Victor Vieux f1dd299227 Use VT100 escape codes
:
2013-07-25 14:16:36 +00:00
Victor Vieux 7df6c4b9ad Merge pull request #1283 from crosbymichael/username-not-set
Copy authConfigs on save so data is not modified
2013-07-25 06:31:34 -07:00
Daniel YC Lin 8f6b6d5784 Fixes #1286 2013-07-25 15:36:32 +08:00
Michael Crosby 0fc11699ab Add regression test for authConfig overwrite 2013-07-25 03:25:16 +00:00
Michael Crosby 9332c00ca5 Copy authConfigs on save so data is not modified
SaveConfig sets the Username and Password to an empty string
on save.  A copy of the authConfigs need to be made so that the
in memory data is not modified.
2013-07-25 00:35:52 +00:00
Guillaume J. Charmes fd9ad1a194 Fixes #505 - Make sure all output is send on the network before closing 2013-07-24 15:48:51 -07:00
Guillaume J. Charmes 6ae3305040 Merge pull request #1277 from dotcloud/add_commands_unit_tests
* Tests: Reimplement old Commands unit tests in order to insure behavior
2013-07-24 15:24:51 -07:00
shin- 94053b4225 Brew: Added cache prefilling and build summary 2013-07-24 23:48:16 +02:00
shin- 77ff537697 Brew: Fixed docker-py requirement 2013-07-24 23:48:16 +02:00
shin- 362f1735e6 Brew: Avoid duplicate commands, added --debug option, added local repo support 2013-07-24 23:48:16 +02:00
shin- 7813f2a25e Updated git repos for precise and raring 2013-07-24 23:48:16 +02:00
shin- 3781a2cc4b Added definition file for busybox and updated ubuntu 2013-07-24 23:48:16 +02:00
shin- d47df21a33 Add brew script to the contrib folder 2013-07-24 23:48:16 +02:00
Joffrey F 0ac672fea6 Use full hash references in library/
Brew doesn't currently support abridged hashes
2013-07-24 23:48:16 +02:00
Joffrey F c19fa83a8a Use extended syntax (indicate what type of object needs to be checked out) 2013-07-24 23:48:16 +02:00
Solomon Hykes 844a9ab85e Define tags in the library files instead of upstream 2013-07-24 23:48:16 +02:00
Solomon Hykes a45490243b Adding Joffrey as library maintainer 2013-07-24 23:48:16 +02:00
Solomon Hykes b06f627139 Library: hipache and ubuntu base 2013-07-24 23:48:16 +02:00
Andy Rothfusz cc0e091a6b Merge pull request #1278 from metalivedev/logotweaks
Cleaned up long lines, switched graphic to Docker logo. General cleanup.
2013-07-24 10:37:45 -07: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
Victor Vieux 7953d1becb Merge pull request #1271 from dotcloud/1246_change_cfg_format
*Auth: Change dockercfg to json and support multiple auth remote
2013-07-24 05:29:51 -07:00
Victor Vieux f4b41e1a6c fix tests 2013-07-24 12:28:22 +00:00
Victor Vieux 4bc3328e80 bump master 2013-07-24 12:18:53 +00:00
Victor Vieux ebe17f57ff Merge pull request #1180 from dotcloud/1167_events_endpoint-feature
*Api: Add the /events endpoint
*Client: Add the docker events command
2013-07-24 04:53:36 -07:00
Victor Vieux ee05f97c9a Merge branch 'master' into 1167_events_endpoint-feature 2013-07-24 11:49:04 +00:00
Andy Rothfusz 78c02d038f Cleaned up long lines, switched graphic to Docker logo. General cleanup. 2013-07-23 18:13:53 -07:00
Guillaume J. Charmes bc823acc25 Reimplement old Commands unit tests in order to insure behavior 2013-07-23 17:27:49 -07:00
Daniel Mizyrycki c21c5afe00 Merge pull request #1147 from dotcloud/1104-testing-static
testing, issue #1104: Make the test use static flags
2013-07-23 17:07:36 -07: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
Thatcher Peskens e701dce339 Docs: Fixed navigaton links to about page and community page
Website: Removed the website sources from the repo. The website sources are now hosted on github.com/dotcloud/www.docker.io/
2013-07-23 13:05:06 -07:00
Victor Vieux a93a87f64a Merge branch 'stfp-858-disable-network-configuration' 2013-07-23 19:55:50 +00:00
Victor Vieux 7aba68cd54 update AUTHORS 2013-07-23 19:55:38 +00:00
Victor Vieux dfc64d157a Merge pull request #1241 from ryfow/patch-1
Make the ENTRYPOINT example work
2013-07-23 08:45:04 -07:00
Victor Vieux a41384ad73 add die event 2013-07-23 15:42:34 +00:00
Victor Vieux ed7a4236b3 Add tests for the api 2013-07-23 15:42:34 +00: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 8b3519c5f7 getEvents a bit simpler 2013-07-23 15:42:34 +00:00
Victor Vieux ec559c02b8 add docs 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 3bae188b8d change dockercfg to json and support multiple auth remote 2013-07-23 15:07:18 +00:00
Victor Vieux 8165e51ecc Merge branch '858-disable-network-configuration' of https://github.com/stfp/docker into stfp-858-disable-network-configuration 2013-07-23 08:44:12 +00:00
Thatcher 9a15db21a6 Merge pull request #1269 from dhrp/new-website-links
Added new docker logo to the documentation header, and added other links to docs header. Tnx @keeb !
2013-07-22 20:48:29 -07:00
Thatcher Peskens 58a1c5720a Added new docker logo to the documentation header, and added other links. 2013-07-22 20:26:40 -07:00
Stefan Praszalowicz bc172e5e5f Invert network disable flag and logic (unbreaks TestAllocate*PortLocalhost) 2013-07-22 19:00:35 -07:00
Solomon Hykes 6745bdd0b3 Typo in 3rd-party 2013-07-22 18:39:58 -07:00
Solomon Hykes 5714f0a74e Hack: completed step 12 of the bootcamp 2013-07-22 18:36:36 -07:00
Solomon Hykes ce43f4af1c Hack: first draft of the maintainer boot camp. Work in progress! 2013-07-22 18:32:55 -07:00
Sridatta Thatipamala 945033f1cc change permissions of initLayer to be readable by non-root users 2013-07-22 14:55:07 -07:00
Victor Vieux 5d1609f5a2 Merge pull request #1265 from dotcloud/better-bridge-defaults
*Network: Improve default network configuration
2013-07-22 13:54:35 -07:00
Solomon Hykes 4714f102d7 Allocate a /16 IP range by default, with fallback to /24. Try a total of 12 ranges instead of 3. 2013-07-22 12:06:24 -07:00
Guillaume J. Charmes a675da65e9 Merge pull request #1262 from dotcloud/1253_add_directory_check
* Runtime: fix error message when invalid directory
2013-07-22 11:54:22 -07:00
Victor Vieux e39755666b Merge pull request #1236 from dotcloud/1234_overwrites_expose-fix
*Builder: fix overwrites EXPOSE
2013-07-22 09:51:11 -07:00
Victor Vieux 9adba5e2e6 Merge pull request #1264 from dotcloud/fix_tests_env
fix test env
2013-07-22 09:26:34 -07:00
Victor Vieux 5c1af383eb fix test env 2013-07-22 16:26:05 +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 8ea9ccf3a7 Merge pull request #1244 from dotcloud/1020_add_variable
*Runtime: Add container=lxc in default env
2013-07-22 09:17:30 -07:00
Victor Vieux 74a2b13687 fix error message when invalid directory 2013-07-22 14:52:05 +00:00
Victor Vieux 4e7f2b757e Merge pull request #1158 from cespare/1142-docker-add-fix
*Buildfile: determine a filename from a URL if the destination is a directory
2013-07-22 07:07:04 -07:00
Ken Cochrane 2bba279cf1 Merge pull request #1259 from dsissitka/patch-3
*Documentation: Updated the stop command's docs.
2013-07-22 06:59:02 -07:00
Ken Cochrane 56da77a548 Merge pull request #1258 from dsissitka/patch-2
* Documentation: Added top to the list of commands in the sidebar.
2013-07-22 06:58:09 -07:00
Victor Vieux 494b575213 Merge pull request #1255 from dsissitka/patch-1
Fixed a couple of minor syntax errors.
2013-07-22 06:45:25 -07:00
Caleb Spare c383d59880 Update ADD documentation to specify new behavior. 2013-07-21 23:32:06 -07:00
Caleb Spare 416fdaa3d5 Remove some trailing whitespace. 2013-07-21 23:32:06 -07:00
Caleb Spare 2b0ebf5d32 Buildfile: for ADD command, determine filename from URL.
This is used if the destination is a directory. This makes the URL
download behavior more closely match file copying.

Fixes #1142.
2013-07-21 23:32:06 -07:00
Caleb Spare f236e62d9d Test pulling remote files using ADD in a buildfile. 2013-07-21 23:32:01 -07:00
Stefan Praszalowicz 964e826a9b Document -b none 2013-07-21 18:01:52 -07:00
Stefan Praszalowicz 49673fc45c Support completely disabling network configuration with docker -d -b none 2013-07-21 17:49:09 -07:00
Stefan Praszalowicz 3342bdb331 Support networkless containers with new docker run option '-n' 2013-07-21 17:11:47 -07:00
David Sissitka 1d02a7ffb6 Updated the stop command's docs. 2013-07-21 19:00:18 -04:00
dsissitka 788935175e Added top to the list of commands in the sidebar. 2013-07-21 18:30:51 -04:00
dsissitka 32663bf431 Fixed a couple of minor syntax errors. 2013-07-20 21:27:55 -04:00
unclejack df86cb9a5c make docker run handle SIGINT/SIGTERM 2013-07-20 13:47:13 +03:00
Guillaume J. Charmes e3be2e959b Merge pull request #1242 from dotcloud/remove_usage_from_test
remove usage from tests
2013-07-19 14:07:24 -07:00
Victor Vieux 67f1e3f5ed add container=lxc in default env 2013-07-19 17:22:16 +00:00
Andy Rothfusz 23ea9b8968 Merge pull request #1235 from metalivedev/cleandocbld
Make docs build without warnings or errors. Minor additional cleanup.
2013-07-19 09:44:53 -07:00
Victor Vieux 921c6994b1 add LXC version to docker info in debug mode 2013-07-19 16:36:23 +00:00
Victor Vieux ea12588524 remove usage from tests 2013-07-19 15:56:00 +00:00
Ryan Fowler e8ad82f9ba Make the ENTRYPOINT example work
The incantation listed in the ENTRYPOINT example didn't actually pass the arguments to your script. Changing the definition to an array fixes this.
2013-07-19 10:11:21 -05:00
Victor Vieux 6e2e4cad73 Merge pull request #1204 from dotcloud/tests-less-copypaste
Hack: use helper functions in tests for less copy-pasting
2013-07-19 07:55:04 -07:00
Victor Vieux 2e0e455fa6 rebase master 2013-07-19 14:48:32 +00:00
Victor Vieux d93742fe9a Merge pull request #1239 from dotcloud/fix_utils_tests
fix error in utils tests
2013-07-19 06:59:07 -07:00
Victor Vieux 2e3b660dd0 fix error in utils tests 2013-07-19 13:56:36 +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 e59dd2c62c Merge pull request #1159 from unclejack/add_container_id_file_to_run
*Client: Add support for container ID files (a la pidfile)
2013-07-19 06:11:22 -07:00
unclejack 25be79208a create the cidfile before creating the container
This change makes docker attempt to create the container ID file and
open it before attempting to create the container. This avoids leaving
a stale container behind if docker has failed to create and open the
container ID file.

The container ID is written to the file after the container is created.
2013-07-19 16:03:45 +03:00
unclejack 2a3b91e3b6 docs - add example for cidfile 2013-07-19 16:03:45 +03:00
unclejack 221ee504aa docs - add cidfile flag to run docs 2013-07-19 16:03:45 +03:00
unclejack 64e74cefb7 add support for container ID files (a la pidfile) 2013-07-19 16:03:45 +03:00
Victor Vieux eb4a0271fb bump api version to 1.4 2013-07-19 10:34:55 +00:00
Victor Vieux cfec1c3e1b add ps args to docker top 2013-07-19 10:06:32 +00:00
Victor Vieux 2b5386f039 add regression test from @crosbymichael 2013-07-19 03:01:39 +00:00
Victor Vieux a0eec14c7d fix overwrites EXPOSE 2013-07-19 02:47:35 +00:00
Andy Rothfusz 54f9cdb0c3 Make docs build without warnings or errors. Minor additional cleanup. 2013-07-18 19:04:51 -07:00
Guillaume J. Charmes d6fb313220 Merge pull request #1207 from crosbymichael/819-use-persistent-volume
* Runtime: Do not overwrite container volumes from config
2013-07-18 18:51:00 -07:00
Daniel Mizyrycki 0aa2470c76 Merge pull request #1232 from dotcloud/1217-testing-coverage
Testing, issue #1217: Add coverage testing into docker-ci
2013-07-18 14:27:37 -07:00
Victor Vieux 0afed3eded handle -dev 2013-07-18 20:56:41 +00:00
Victor Vieux 39ff542142 Merge branch 'master' into add_last_version-feature 2013-07-18 20:51:31 +00:00
Victor Vieux edc68f84f3 Merge pull request #1230 from dotcloud/switch_dev
switch version to -dev
2013-07-18 13:50:40 -07:00
Victor Vieux 0089dd05e9 switch version to -dev 2013-07-18 20:50:04 +00:00
Victor Vieux 51f6c4a737 Merge pull request #1227 from dotcloud/bump_0.5.0
Bump to 0.5.0
2013-07-18 11:51:29 -07:00
Nan Monnand Deng cd209f406e documentation. 2013-07-18 14:22:49 -04:00
Andy Rothfusz f4eaec3e1e Merge pull request #1226 from metalivedev/easydockerfile
Make dockerfile docs easier to find. Clean up formatting.
2013-07-18 10:14:22 -07:00
Victor Vieux b083418257 change -b -> -v and add udp example 2013-07-18 16:25:14 +00:00
Victor Vieux 5794857f7a Merge pull request #1169 from crosbymichael/buildfile-tests
Add unit tests for buildfile config instructions
2013-07-18 08:35:23 -07:00
Michael Crosby e7f3f6fa5a Add unit tests for buildfile config instructions
Add tests for instructions in the buildfile that
modify the config of the resulting image.
2013-07-18 05:37:28 -09: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
Andy Rothfusz aa5671411b Make dockerfile docs easier to find. Clean up formatting. 2013-07-17 18:56:40 -07:00
Solomon Hykes 5d8efc107d + Runtime: inject dockerinit at /.dockerinit instead of overwriting /sbin/init. This makes it possible to run /sbin/init inside a container. 2013-07-17 17:13:34 -07:00
Victor Vieux f8dfd0aa5e Merge pull request #1225 from dotcloud/hotfix_docker_rmi
*Runtime: improve docker rmi via id
2013-07-17 14:31:56 -07:00
Victor Vieux 1a226f0e28 add VolumesFrom to MergeConfig, and test 2013-07-17 21:06:46 +00:00
Andy Rothfusz 3dbf9c6560 Merge pull request #1219 from metalivedev/docs-repoupdate
Update docs with 0.5 repository information.
2013-07-17 13:53:12 -07:00
Victor Vieux 7c00201222 add Volumes and VolumesFrom to CompareConfig 2013-07-17 20:51:25 +00:00
Victor Vieux 2db99441c8 prevent any kind of operation simultaneously 2013-07-17 20:39:36 +00:00
Guillaume J. Charmes de563a3ea3 Merge pull request #1194 from crosbymichael/build-verbose
* Builder: Add verbose output to docker build
2013-07-17 12:53:06 -07:00
Victor Vieux 9cf2b41c05 change rm usage in docs 2013-07-17 19:24:54 +00:00
Victor Vieux f310b875f8 Merge branch 'master' of https://github.com/kencochrane/docker into kencochrane-master 2013-07-17 19:23:06 +00:00
Solomon Hykes ac14c463d5 Changed date on changelog 2013-07-17 11:51:26 -07:00
Guillaume J. Charmes 578e888915 Merge pull request #1212 from dotcloud/merge_v_b_options
* Runtime: Merge -b and -v options
2013-07-17 11:43:47 -07:00
Victor Vieux 5231bf3653 Merge pull request #1222 from lopter/master
Always stop the opposite goroutine in network_proxy.go (closes #1213)
2013-07-17 11:40:33 -07:00
Solomon Hykes 8af945f353 Small changes in changelog wording 2013-07-17 11:39:38 -07:00
Ken Cochrane d0e8ca1257 updated with notes from @vieux 2013-07-17 13:46:11 -04:00
Victor Vieux 5a934fc923 fix docker rmi via id 2013-07-17 15:48:53 +00:00
Louis Opter c766d064ac Always stop the opposite goroutine in network_proxy.go (closes #1213) 2013-07-17 01:05:11 -07:00
Andy Rothfusz 0356081c0a Update repository information. 2013-07-16 17:04:41 -07:00
Daniel Mizyrycki 6e8bfc8d12 Testing, issue #1217: Add coverage testing into docker-ci 2013-07-16 13:45:43 -07:00
Guillaume J. Charmes 18e91d5f85 Update docs 2013-07-16 10:14:21 -07:00
Victor Vieux 48a892bee5 Add CompareConfig test 2013-07-16 15:58:23 +00:00
Victor Vieux fb005a3da8 add server.ContainerTop, server.poolAdd and ser.poolRemove tests 2013-07-16 14:38:18 +00:00
Guillaume J. Charmes 1004d57b85 Hotfix: make sure ./utils tests pass 2013-07-15 17:58:23 -07:00
Nick Stinemates f9e4ef5eb0 Merge pull request #1210 from dotcloud/improve_configmerge
improve mergeconfig, ...
2013-07-15 18:04:12 -07:00
Guillaume J. Charmes eefbadd230 Merge -b and -v options 2013-07-15 17:51:32 -07:00
Guillaume J. Charmes bc21b3ebf0 Bump version to 0.5.0 2013-07-15 14:57:52 -07:00
Solomon Hykes 608fb2a21e Merge pull request #1184 from dotcloud/1176-packaging-release
Hack: document PPA release step
2013-07-15 13:59:55 -07:00
Michael Crosby 92cbb7cc80 Do not overwrite container volumes from config
Fixes #819 Use same persistent volume when a container is restarted
2013-07-15 11:59:11 -09:00
Solomon Hykes 45050d9887 Merge pull request #1188 from dotcloud/1174-packaging-binary
Packaging: add pure binary to docker release
2013-07-15 13:59:06 -07:00
Daniel Mizyrycki 75a0052e64 packaging, issue #1176: Document PPA release step 2013-07-15 12:13:51 -07:00
Guillaume J. Charmes c8efd08384 Merge pull request #1208 from crosbymichael/1201-rw-volumes-from
- Volumes: Copy VolumesRW values when using --volumes-from
2013-07-15 10:59:51 -07:00
Guillaume J. Charmes 454cd147fb Merge pull request #1096 from dotcloud/remove_os_user
* Runtime: Remove the os.user dependency and manually lookup /etc/passwd instead
2013-07-15 10:19:09 -07:00
Guillaume J. Charmes e41507bde2 Add unit test to check wrong uid case 2013-07-15 10:05:09 -07:00
Victor Vieux 599f85d4e4 store both logs in a same file, as JSON 2013-07-15 16:17:58 +00:00
Victor Vieux 5756ba9bc4 Merge branch 'master' into new_logs 2013-07-15 13:57:54 +00:00
Victor Vieux 193a7e1dc1 improve mergeconfig, if dns, portspec, env or volumes specify in docker run, apend and not replace 2013-07-15 13:12:33 +00:00
Jonas Pfenniger 0900d3b7a6 docker.upstart: use the same start/stop events as sshd
Is probably more solid
2013-07-15 11:41:19 +01:00
Jonas Pfenniger 24dd50490a docker.upstart: avoid spawning a sh process
start script / end script create an intermediate sh process.
2013-07-15 11:40:35 +01:00
Michael Crosby 5ae8c7a985 Copy VolumesRW values when using --volumes-from
Fixes #1201
2013-07-14 18:23:20 -09:00
benoitc d639f61ec1 reuse the type 2013-07-13 19:19:38 +02:00
Victor Vieux 9b57f9187b Merge pull request #1200 from ToothlessGear/fix-whitespaces_progessbar
Fix progressbar, without messing up other outputs
2013-07-13 08:50:50 -07:00
Victor Vieux 50e45b485f Merge pull request #1190 from dotcloud/1189-add_debug_error
* RemoteAPI: Improve debug
2013-07-13 08:15:59 -07:00
Victor Vieux 2051ebc0eb Merge pull request #1198 from dotcloud/fix_pull_tag
Fixed tag option for "docker pull" (the option was ignored)
2013-07-13 08:14:47 -07:00
benoitc a3b1a9f01a useless function. forgot to remove it. 2013-07-13 17:04:04 +02:00
benoitc 507cef8bce useless type 2013-07-13 17:03:04 +02:00
benoitc 166eba3e28 put the websocket route in the map containing all routes
Instead of handling the websocket differently just handle it as a normal
route and upgrade it to a websocket.
2013-07-13 17:00:40 +02:00
Solomon Hykes 080243f040 Hack: use helper functions in tests for less copy-pasting 2013-07-12 17:56:55 -07:00
Guillaume J. Charmes 933b9d44e1 Merge pull request #1054 from nickstenning/getimage-by-tag
* Runtime: Reverse priority of tag lookup in TagStore.GetImage
2013-07-12 16:15:04 -07:00
Nick Stenning 44b3e8d51b Reverse priority of tag lookup in TagStore.GetImage
Currently, if you have the following images:

    foo/bar      1       23b27d50fb49
    foo/bar      2       f2b86ec3fcc4

And you issue the following command:

    docker tag foo/bar:2 foo/bar latest

docker will tag the "wrong" image, because the image id for foo/bar:1 starts
with a "2". That is, you'll end up with the following:

    foo/bar      1       23b27d50fb49
    foo/bar      2       f2b86ec3fcc4
    foo/bar      latest  23b27d50fb49

This commit reverses the priority given to tags vs. image ids in the
construction `<user>/<repo>:<tagOrId>`, meaning that if a tag that is an exact
match for the specified `tagOrId`, it will be tagged in preference to an image
with an id that happens to start with the correct character sequence.
2013-07-12 23:56:36 +01:00
Daniel Mizyrycki 9bf8ad741f Merge pull request #1083 from hukeli/debian
Keep debian package up-to-date
2013-07-12 15:24:37 -07:00
Daniel Mizyrycki 9913ebbe21 Merge pull request #1203 from dotcloud/1202-packaging-debian
Packaging, issue #1202: Upgrade vagrantfile go in debian packaging
2013-07-12 15:11:57 -07:00
Daniel Mizyrycki c7a48e91d8 Packaging, issue #1202: Upgrade vagrantfile go in debian packaging 2013-07-12 15:06:12 -07:00
Solomon Hykes 2cbf2200ac Merge pull request #1195 from dotcloud/tests-cleanup
* Hack: tests cleanup
2013-07-12 14:51:59 -07: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
Marcus Farkas a6e5a397bd Revert "Client: better progressbar output"
This reverts commit 3ac68f1966.
2013-07-12 20:08:45 +02:00
Ken Cochrane 364f48d6c7 updated the rmi command docs, the had typos 2013-07-12 14:05:26 -04:00
Ken Cochrane 4174e7aa7a updated the help commands on a few commands that were not correct 2013-07-12 13:55:26 -04:00
Guillaume J. Charmes eb38750d99 Remove the os.user dependency and manually lookup /etc/passwd instead 2013-07-12 10:49:47 -07:00
Sam Alba cd0fef633c Fixed tag option for "docker pull" (the option was ignored) 2013-07-12 10:42:54 -07:00
Michael Crosby d0c73c28df Add param to api docs for verbose build output 2013-07-12 06:22:56 -09:00
Victor Vieux 8e6c249e48 Merge pull request #1197 from crosbymichael/buildfile-doc-ordering
Fix Docker Builder documentation section numbers
2013-07-12 05:27:47 -07:00
Victor Vieux 752f99e8a1 Merge pull request #977 from dotcloud/966-improve_docker_login_parameters-feature
* Client: Add options to docker login to be able to use it via script
2013-07-12 05:07:25 -07:00
Victor Vieux a909223ee2 Merge pull request #1102 from dotcloud/1098-store_hostconfig_tmp
* Runtime: bind mounts are now preserved upon container restart
2013-07-12 05:04:10 -07:00
Victor Vieux 8ff271fc74 Merge pull request #1192 from dotcloud/docker_port-fix
hotfix: fix broken docker port
2013-07-12 04:57:53 -07:00
Victor Vieux 9dfac1dd65 Merge pull request #1055 from dotcloud/list_container_processes-feature
* RemoteApi: /top to list running processes in a container
* Client: docker top to list running processes in a container
2013-07-12 04:56:12 -07:00
Victor Vieux a8a6848ce0 fix tests regarding the new test image 2013-07-12 11:54:53 +00:00
Victor Vieux 9232d1ef62 Merge branch 'master' into list_container_processes-feature 2013-07-12 11:47:27 +00:00
Victor Vieux e9011122fb use http://get.docker.io/latest 2013-07-12 11:45:40 +00:00
Michael Crosby 90483dc912 Fix Docker Builder documentation numbering 2013-07-11 16:41:19 -09:00
Solomon Hykes 6bdb6f226b Simplify unit tests code with mkRuntime() 2013-07-11 17:59:25 -07:00
Solomon Hykes 2ac1141980 Don't leave broken, commented out tests lying around. 2013-07-11 17:58:45 -07:00
Michael Crosby 1104d443cc Revert changes from PR 1030
With streaming output of the build
changes in 1030 are no longer required.
2013-07-11 15:52:08 -09:00
Michael Crosby 49044a9608 Fix buildfile tests after rebase 2013-07-11 15:37:26 -09:00
Guillaume J. Charmes 71d2ff4946 Hotfix: check the length of entrypoint before comparing. 2013-07-11 17:31:07 -07:00
Michael Crosby 474191dd7b Add verbose output to docker build
Verbose output is enabled by default and
the flag -q can be used to suppress the verbose output.
2013-07-11 15:27:33 -09:00
Guillaume J. Charmes 637eceb6a7 Merge pull request #1124 from crosbymichael/buildfile-volumes
+ Builder: Add VOLUME instruction to buildfile
2013-07-11 17:16:57 -07:00
Victor Vieux 976428f505 change output 2013-07-11 21:04:23 +02:00
Victor Vieux affe7caf78 fix broken docker port 2013-07-11 19:28:15 +02:00
Victor Vieux 941e3e2ef0 wip 2013-07-11 17:18:28 +00:00
Victor Vieux b7937e268f add debug for error in the server 2013-07-11 12:21:43 +00:00
Louis Opter 5a411fa38e Make the TestAllocate{UDP,TCP}PortLocalhost more reliable
- For the TCP test try again if socat wasn't listening yet;
- For the UDP test raise the timeout to a minute to workaround what
  seems to be an issue with Linux.
2013-07-10 18:25:53 -07:00
Daniel Mizyrycki bf26ae03cf Packaging, issue #1174: Add pure binary to docker release 2013-07-10 17:39:00 -07:00
Andy Rothfusz 3363cd5cd0 Merge pull request #1178 from dotcloud/fix-dev-environment
Fix outdated docs explaining how to setup a dev environment
2013-07-10 16:53:22 -07:00
Daniel Mizyrycki 5c49a61353 Merge pull request #1183 from dotcloud/960-packaging-PPA
Packaging, issue #960: Document PUBLISH_PPA for staging/production release
2013-07-10 16:16:31 -07:00
Daniel Mizyrycki f83c31e188 Packaging, issue #960: Document PUBLISH_PPA for staging/production release 2013-07-10 16:06:49 -07:00
Louis Opter 8f36467107 Raise the timeouts for the TCP/UDP localhost proxy tests
Sometimes these tests fail, let's see if that improves the situation.
2013-07-10 16:05:14 -07:00
Nan Monnand Deng 73e79a3310 reduce the number of string copy operations. 2013-07-10 18:59:43 -04:00
Nan Monnand Deng 34cf976866 format in the user agent header should follow RFC 2616 2013-07-10 18:59:43 -04:00
Nan Monnand Deng e832b01349 Removed an unnecessary nil assignment 2013-07-10 18:56:49 -04:00
Nan Monnand Deng 26c8eae6fe Removed an unnecessary error check. 2013-07-10 18:56:49 -04:00
Nan Monnand Deng d40efc4648 added client's kernel version 2013-07-10 18:56:49 -04:00
Nan Monnand Deng 5705a49308 Insert version checkers when call NewRegistry() 2013-07-10 18:56:49 -04:00
Nan Monnand Deng 65185a565b added APIVersion when call NewRegistry 2013-07-10 18:53:38 -04:00
Nan Monnand Deng 1bb8f60d5a inserted setUserAgent in each HTTP request 2013-07-10 18:49:01 -04:00
Nan Monnand Deng 1d01189f04 Added version checker interface 2013-07-10 18:49:01 -04:00
Victor Vieux fc3a8e409d change tag -> repo name in build usage 2013-07-10 22:44:31 +00:00
Louis Opter 8e49cb453f Merge pull request #1181 from dotcloud/export_portmapping
Export PortMapping in container.go
2013-07-10 14:24:20 -07:00
Michael Crosby 40f1e4edbe Rebased changes buildfile_test 2013-07-10 07:12:57 -09:00
Michael Crosby 1267e15b0f Add unittest for volume config verification 2013-07-10 06:59:16 -09:00
Michael Crosby eb9fef2c42 Add VOLUME instruction to buildfile 2013-07-10 06:59:16 -09:00
Victor Vieux 43b346d93b Merge pull request #1151 from alex/patch-1
Replaced gendered language in the README
2013-07-10 07:52:30 -07:00
Victor Vieux d918c7d9de export portmapping in network.go 2013-07-10 14:09:35 +00:00
Victor Vieux e962e9edcf Merge pull request #1168 from dotcloud/standalone_registry
* Server: Allow push on standalone registry
2013-07-10 04:14:23 -07:00
Victor Vieux b7a62f1f1b Merge pull request #1177 from lopter/udp-support-final
* Network: Add UDP support
2013-07-10 03:55:18 -07:00
Victor Vieux 2e5d1a2d48 Merge pull request #1164 from dotcloud/1162-import_hangs-fix
* Runtime: Untar is now faster
2013-07-10 03:37:24 -07:00
Louis Opter fac0d87d00 Add support for UDP (closes #33)
API Changes
-----------

The port notation is extended to support "/udp" or "/tcp" at the *end*
of the specifier string (and defaults to tcp if "/tcp" or "/udp" are
missing)

`docker ps` now shows UDP ports as "frontend->backend/udp". Nothing
changes for TCP ports.

`docker inspect` now displays two sub-dictionaries: "Tcp" and "Udp",
under "PortMapping" in "NetworkSettings".

Theses changes stand true for the values returned by the HTTP API too.

This changeset will definitely break tools built upon the API (or upon
`docker inspect`). A less intrusive way to add UDP ports in `docker
inspect` would be to simply add "/udp" for UDP ports but it will still
break existing applications which tries to convert the whole field to an
integer. I believe that having two TCP/UDP sub-dictionaries is better
because it makes the whole thing more clear and more easy to parse right
away (i.e: you don't have to check the format of the string, split it
and convert the right part to an integer)

Code Changes
------------

Significant changes in network.go:

- A second PortAllocator is instantiated for the UDP range;
- PortMapper maintains separate mapping for TCP and UDP;
- The extPorts array in NetworkInterface is now an array of Nat objects
  (so we can know on which protocol a given port was mapped when
  NetworkInterface.Release() is called);
- TCP proxying on localhost has been moved away in network_proxy.go.

localhost proxy code rewrite in network_proxy.go:

We have to proxy the traffic between localhost:frontend-port and
container:backend-port because Netfilter doesn't work properly on the
loopback interface and DNAT iptable rules aren't applied there.

- Goroutines in the TCP proxying code are now explicitly stopped when
  the proxy is stopped;
- UDP connection tracking using a map (more infos in [1]);
- Support for IPv6 (to be more accurate, the code is transparent to the
  Go net package, so you can use, tcp/tcp4/tcp6/udp/udp4/udp6);
- Single Proxy interface for both UDP and TCP proxying;
- Full test suite.

[1] https://github.com/dotcloud/docker/issues/33#issuecomment-20010400
2013-07-09 17:42:35 -07:00
Solomon Hykes a839b36e55 Fix outdated docs explaining how to setup a dev environment. Building docker with docker ftw 2013-07-09 16:48:16 -07:00
Sam Alba 316c8328aa Hardened repos name validation 2013-07-09 16:46:55 -07:00
Sam Alba e8db031112 Fixed tag parsing when the repos name contains both a port and a tag 2013-07-09 16:46:25 -07:00
Sam Alba 59b785a282 Fixing missing tag field when pulling containers which does not exist 2013-07-09 16:45:32 -07:00
Louis Opter 1a1daca621 Fix a typo in runtime_test.go: Availalble -> Available 2013-07-09 11:52:33 -07:00
Sam Alba 837be914ca Merge branch 'master' of github.com:dotcloud/docker into standalone_registry 2013-07-09 11:31:14 -07:00
Sam Alba f44eac49fa Fixed potential security issue (never try http on official index when polling the endpoint). Also fixed local repos name when pulling index.docker.io/foo/bar 2013-07-09 11:30:12 -07:00
Guillaume J. Charmes 0acdef4549 Merge pull request #1166 from dotcloud/networkless_tests-2
* Tests: Remove all network dependencies from the test suite
2013-07-09 11:20:18 -07:00
Guillaume J. Charmes 7d8ef90ccb Merge pull request #1173 from dotcloud/1172-ghost_restart-fix
Make sure container is not marked as ghost when it starts
2013-07-09 10:49:17 -07:00
Guillaume J. Charmes 91520838fc Make sure container is not marked as ghost when it starts 2013-07-09 10:48:33 -07:00
Guillaume J. Charmes ada0e1fb08 Merge pull request #1049 from dotcloud/1040_ignore_stderr_tests-fix
- Tests: Ignore stderr while doing tests
2013-07-09 10:32:24 -07:00
Sam Alba 33d97e81eb Removed DOCKER_INDEX_URL 2013-07-09 08:10:43 -07:00
Sam Alba 019324015b Moved parseRepositoryTag to the utils package 2013-07-09 08:06:10 -07:00
Victor Vieux 72d278fdac Merge pull request #1170 from dotcloud/fix_type_socket
Fix typo socket
2013-07-09 03:57:45 -07:00
Victor Vieux 05d7f85af9 fix typo 2013-07-09 10:55:28 +00:00
Solomon Hykes 7fba358ae2 Merge pull request #1013 from dotcloud/standardize-build
* Hack: standardized docker's build environment in a Dockerfile
2013-07-08 21:33:45 -07:00
Solomon Hykes 9f1fc40a64 * Hack: standardized docker's build environment in a Dockerfile 2013-07-08 21:30:29 -07:00
Sam Alba 3be7bc38e0 Fixed typo (thanks unit tests) 2013-07-08 17:42:18 -07:00
Sam Alba 31c66d5a00 Re-implemented a notion of local and private repos. This allows to consider the full qualified name of the repos as the name for the local repository without breaking the calls to the Registry API. 2013-07-08 17:26:50 -07:00
Sam Alba e7d36c9590 It is now possible to include a ":" in a local repository name (it will not be the case for a remote name). This adds support for full qualified repository name in order to support private registry server 2013-07-08 17:22:41 -07:00
Sam Alba 3e8626c4a1 Changed the tag parsing to it will work even if there is a port in the repos registry url (full qualified name for pushing on a standalone registry) 2013-07-08 17:20:41 -07:00
Guillaume J. Charmes e14dd4d33e Merge pull request #1157 from kstaken/1156-entrypoint-builder
Builder: Fix #1156 entrypoint override from base image
2013-07-08 16:57:26 -07:00
Kimbro Staken 87a69e6753 Merge branch '1156-entrypoint-builder' of github.com:kstaken/docker into 1156-entrypoint-builder 2013-07-08 16:06:09 -07:00
Kimbro Staken f64dbdbe3a Override Entrypoint picked up from the base image that breaks run commands in builder 2013-07-08 16:04:39 -07:00
Kimbro Staken 2b5553144a Removing the save to disk as it was not really necessary 2013-07-08 16:03:18 -07:00
Guillaume J. Charmes e43ef364cb Remove all network dependencies from the test suite 2013-07-08 15:23:04 -07:00
Guillaume J. Charmes 08a87d4b3b Fix #1162 - Remove bufio from Untar 2013-07-08 13:42:17 -07:00
Victor Vieux 90f372af5c Merge pull request #1163 from dotcloud/1137-change_search_size-feature
* Client : uses the terminal size to display search output, add -notrunc
2013-07-08 11:47:25 -07:00
Victor Vieux 3ec29eb5da Merge pull request #1066 from mhennings/fix-broken-streaming-result
* Server: Fix streaming status to the docker client while pushing images
2013-07-08 11:21:29 -07:00
Victor Vieux 3a20e4e15d add if to prevent crash 2013-07-08 18:19:12 +00:00
Victor Vieux fd97190ee7 uses the terminal size to display search output, add -notrunc and fix bug in resize 2013-07-08 17:20:13 +00:00
Victor Vieux 70480ce7bc Merge pull request #1030 from dotcloud/builder_display_err_log
*Builder : Display containers logs in case of build failure
2013-07-08 07:26:46 -07:00
Victor Vieux bf7d6cbb4a rebase master 2013-07-08 13:26:29 +00:00
Victor Vieux c059785ffb Merge pull request #1161 from dotcloud/add_remote_addr_debug
Add remote addr in debug
2013-07-08 05:46:49 -07:00
Victor Vieux a0f5fb7394 add remote addr in debug 2013-07-08 12:45:50 +00:00
Victor Vieux ad33e9f388 Merge pull request #1138 from dotcloud/1123-rmi_conflict-fix
* Runtime: Fix error in rmi when conflict
2013-07-08 05:19:05 -07:00
Kimbro Staken 1d1d81b0bc Cleanup white space 2013-07-08 00:18:47 -07:00
Kimbro Staken f3d2969560 Override Entrypoint picked up from the base image that breaks run commands in builder 2013-07-08 00:11:45 -07:00
Alex Gaynor 758ea61b77 Replaced gendered language in the README 2013-07-07 13:55:02 +10:00
benoitc 8eeff01939 add websocket support to /container/<name>/attach/ws
This function add the possibility to attach containers streams to a
websocket. When a websocket is asked the request is upgraded to this
protocol..
2013-07-06 02:05:02 +02:00
Daniel Mizyrycki 4388bef996 testing, issue #1104: Make the test use static flags 2013-07-05 16:49:55 -07:00
Sam Alba e2b8ee2723 Fixed runtime_test (ImagePull prototyped changed) 2013-07-05 16:03:22 -07:00
Guillaume J. Charmes 07dc0a5120 Merge pull request #1144 from dotcloud/standalone_registry
* Registry: Standalone registry
2013-07-05 15:56:48 -07:00
Sam Alba d3125d8570 Code cleaning 2013-07-05 15:26:08 -07:00
Sam Alba 283ebf3ff9 fmt.Errorf instead of errors.New 2013-07-05 14:56:56 -07:00
Sam Alba 4c174e0bfb Fixed ping URL 2013-07-05 14:55:48 -07:00
Sam Alba 57a6c83547 Allowing namespaces in standalone registry 2013-07-05 14:30:43 -07:00
Sam Alba cfc7684b7d Restoring old changeset lost by previous merge 2013-07-05 12:37:07 -07:00
Sam Alba be49f0a118 Merging from master 2013-07-05 12:27:10 -07:00
Sam Alba 66a9d06d9f Adding support for nicer URLs to support standalone registry (+ some registry code cleaning) 2013-07-05 12:20:58 -07:00
Guillaume J. Charmes 6940cf1ecd Merge pull request #1127 from cespare/patch-1
Typo fix
2013-07-05 10:48:59 -07:00
Guillaume J. Charmes 4e0cdc016a Revert #1126. Remove mount shm 2013-07-05 10:47:00 -07:00
Guillaume J. Charmes 8a8109648a Merge pull request #1129 from cespare/style-fixes-2
Style fixes for fmt + err usage.
2013-07-05 10:31:53 -07:00
Guillaume J. Charmes dc8b359319 Merge pull request #1126 from karanlyons/patch-1
* Runtime: Mount /dev/shm as a tmpfs.
2013-07-05 10:31:05 -07:00
Victor Vieux dea29e7c99 Fix error in rmi when conflict 2013-07-05 16:58:39 +00:00
Daniel Mizyrycki ab6379b3e0 Merge pull request #1133 from dotcloud/775-testing-notifications
testing, issue #775: Add automatic testing notifications to docker-ci
2013-07-04 21:48:00 -07:00
Daniel Mizyrycki f7fed2ea5f testing, issue #775: Add automatic testing notifications to docker-ci 2013-07-04 21:43:46 -07:00
Daniel Mizyrycki 35e87ee571 Merge pull request #1132 from dotcloud/776-testing-commit
testing, issue #776: Ensure docker-ci test docker code as it was at commit time
2013-07-04 20:37:51 -07:00
Daniel Mizyrycki ab3893ff4d testing, issue #776: Ensure docker-ci test docker code as it was at commit time 2013-07-04 20:28:54 -07:00
Caleb Spare 1277dca335 Style fixes for fmt + err usage.
fmt.Printf and friends will automatically format using the error
interface (.Error()) preferentially; no need to do err.Error().
2013-07-04 14:33:17 -07:00
Caleb Spare ba9aef6f2c Typo fix
Error message grammar tweak
2013-07-04 12:40:14 -07:00
Karan Lyons dd619d2bd6 Mount /dev/shm as a tmpfs.
Fixes #1122.
2013-07-04 09:58:50 -07:00
Marco Hennings 1e2ef274cd Pushing an Image causes the docker client to give an error message instead of
writing out streamed status.

This is caused by a Buffering message that is not in the correct json format:

[...]
{"status"
:"Pushing 6bba11a28f1ca247de9a47071355ce5923a45b8fea3182389f992f4
24b93edae"}Buffering to disk 244/? (n/a)..
{"status":"Pushing",[...]

The "Buffering to disk" message is originated in
srv.runtime.graph.TempLayerArchive

I am now using the StreamFormatter provided by the context from which the
method is called.
2013-07-04 10:50:37 +02:00
Guillaume J. Charmes bcb5e36dd9 Merge pull request #1111 from cespare/style-fixes
Style fixes
2013-07-03 14:46:05 -07:00
Caleb Spare 19121c16d9 Implement several golint suggestions, including:
* Removing type declarations where they're inferred
* Changing Url -> URL, Id -> ID in names
* Fixing snake-case names
2013-07-03 14:36:04 -07:00
Caleb Spare 27ee261e60 Simplify the NopWriter code. 2013-07-03 14:35:18 -07:00
Caleb Spare da3962266a Gofmt -s (simplify) 2013-07-03 14:35:18 -07:00
Caleb Spare e93afcdd2b Use fmt.Errorf when appropriate. 2013-07-03 14:35:18 -07:00
Caleb Spare dd1b9e38e9 Typo correction: Excepted -> Expected' 2013-07-03 14:35:18 -07:00
Guillaume J. Charmes 96bc9ea7c1 Merge pull request #1112 from cespare/mutex-style
Mutex style change.
2013-07-03 10:34:32 -07:00
Guillaume J. Charmes 16c8a10ef9 Merge pull request #1053 from dynport/do-not-copy-hostname-from-image
do not merge hostname from image
2013-07-03 10:34:15 -07:00
Victor Vieux 64450ae3f8 add last version 2013-07-03 17:11:00 +00:00
Joffrey F 5dcd11be16 Merge pull request #1109 from dynport/remote-lookup-fix
Fix remote lookup when pushing into registry
2013-07-03 06:29:19 -07:00
Ken Cochrane dc91a7b641 Merge pull request #1113 from metalivedev/docs20130702
* Documentation: fix broken link on the documentation index page
2013-07-03 05:52:25 -07:00
Andy Rothfusz 11998ae7d6 Fix installation link from welcome page. 2013-07-02 16:48:57 -07:00
Caleb Spare 1cf9c80e97 Mutex style change.
For structs protected by a single mutex, embed the mutex for more
concise usage.

Also use a sync.Mutex directly, rather than a pointer, to avoid the
need for initialization (because a Mutex's zero-value is valid and
ready to be used).
2013-07-02 15:53:08 -07:00
Andy Rothfusz 6dbcdd3ed5 Merge pull request #1095 from metalivedev/docs20130627
Docs and images updates
2013-07-02 15:13:31 -07:00
Tobias Schwab 9632cf09bf fix two obvious bugs??? 2013-07-02 22:11:03 +00:00
Andy Rothfusz 96ab3c540d Merge branch 'docs20130627' of github.com:metalivedev/docker into docs20130627
Conflicts:
	docs/sources/concepts/manifesto.rst
	docs/sources/index.rst
2013-07-02 15:10:07 -07:00
Andy Rothfusz ff964d327d Cleaning up the welcome page, terminology, and images. 2013-07-02 15:03:29 -07:00
Andy Rothfusz 4b8688f1e5 Fix broken quickstart link 2013-07-02 14:10:06 -07:00
Andy Rothfusz 55b5889a0f Merge branch 'docs20130627' of github.com:metalivedev/docker into docs20130627
Conflicts:
	docs/sources/concepts/manifesto.rst
2013-07-02 13:00:08 -07:00
Andy Rothfusz dd4c6f6a09 Shortened lines to 80 columns 2013-07-02 12:09:57 -07:00
Andy Rothfusz 6058261a26 Clean up image text, minor updates to docs. 2013-07-02 12:09:57 -07:00
Andy Rothfusz b461e4607d Adding files for terms 2013-07-02 12:09:57 -07:00
Andy Rothfusz d399f72098 Cleaning up the welcome page, terminology. 2013-07-02 12:09:57 -07:00
Guillaume J. Charmes c9e1c65c64 Merge pull request #1107 from eliasp/issue-1020
* Runtime: Don't remove the container= environment variable.
2013-07-02 11:42:44 -07:00
Victor Vieux 3042f11666 never remove the file and try to load it in start 2013-07-02 18:02:16 +00:00
Elias Probst e5e47c9862 Don't remove the container= environment variable, as it is crucial for a lot of tools to detect, whether they're run inside an LXC container or not. 2013-07-02 19:13:37 +02:00
Victor Vieux 1c5083315d Merge pull request #1103 from shin-/1060-pull-only-tagged-images
*Registry: When no tag is specified in docker pull, skip images that are not tagged
2013-07-02 10:08:21 -07:00
Victor Vieux 27a137ccab change file location 2013-07-02 17:02:42 +00:00
shin- 7cc294e777 When no tag is specified in docker pull, skip images that are not tagged 2013-07-02 18:25:06 +02:00
Daniel Mizyrycki a20dcfb049 Merge pull request #987 from dotcloud/601-packaging-ubuntu
Packaging|ubuntu, issue #601: Allow packaging prerm to do its job
2013-07-02 08:51:01 -07:00
Victor Vieux 06b53e3fc7 store hostConfig to /tmp while container is running 2013-07-02 12:19:25 +00:00
Victor Vieux 8f9dd86146 Merge pull request #1101 from dotcloud/fix-unit_tests
add sleep in tests and go fmt
2013-07-02 03:48:24 -07:00
Victor Vieux ebba0a6024 add sleep in tests and go fmt 2013-07-02 10:47:37 +00:00
Victor Vieux c9236d99d2 Merge pull request #1099 from lopter/master
*Test :  Fix
2013-07-02 02:42:21 -07:00
Louis Opter f03c1b8eeb More unit test fixes
- Fix TestGetImagesJSON when there is more than one image in the test
  repository;
- Remove an hardcoded constant use in TestGetImagesByName;
- Wait in a loop in TestKillDifferentUser;
- Use env instead of /usr/bin/env in TestEnv;
- Create a daemon user in contrib/mkimage-unittest.sh.
2013-07-01 17:24:21 -07:00
Guillaume J. Charmes 6f23e39e6b Merge pull request #1097 from dotcloud/bump_0.4.8
Bump version to 0.4.8
2013-07-01 17:13:19 -07:00
Solomon Hykes fe0378e9b3 Rephrase changelog 2013-07-01 17:05:49 -07:00
Guillaume J. Charmes 96a1d7c645 Bump version to 0.4.8 2013-07-01 16:58:25 -07:00
Guillaume J. Charmes 79ee8b46f4 Merge pull request #1046 from dotcloud/1043-output_id_non_attach-fix
- Runtime: Make sure the ID is displayed usgin run -d
2013-07-01 16:49:43 -07:00
Victor Vieux 55a7a8b8c9 Merge pull request #1092 from lopter/master
Fix TestGetInfo when there is more than one image in the test repository
2013-07-01 16:41:01 -07:00
Andy Rothfusz b47873c5ac Clean up image text, minor updates to docs. 2013-07-01 16:37:13 -07:00
Andy Rothfusz adf75d402a Adding files for terms 2013-07-01 16:37:13 -07:00
Andy Rothfusz cb1fdb2f03 Cleaning up the welcome page, terminology. 2013-07-01 16:37:13 -07:00
Victor Vieux d1d66b9c5f Merge pull request #1078 from kstaken/fix_json_error
* Remote API: Small fix in /start if empty host config
2013-07-01 16:36:58 -07:00
Louis Opter 6dacbb451f Fix TestGetInfo when there is more than one image in the test repository
See also #1089, #1072.
2013-07-01 15:06:08 -07:00
Guillaume J. Charmes ead9cefadb Merge pull request #1089 from dotcloud/multiple_test_images-fix
- Tests: Fix unit tests when there is more than one tag within the test image
2013-07-01 13:58:04 -07:00
Guillaume J. Charmes 185a2fc55e Merge pull request #1086 from crosbymichael/1008-image-entrypoint
+ Builder: Add Entrypoint to builder and container config
2013-07-01 13:33:12 -07:00
Ken Cochrane fb8fac6c60 Merge pull request #1088 from kpelykh/master
* Documentation: Update Docker Remote API client list to include Java library
2013-07-01 12:50:31 -07:00
Guillaume J. Charmes b6f288a1ce Fix unit tests when there is more than one tag within the test image 2013-07-01 11:45:45 -07:00
zettaset-kpelykh aa9bec96b1 Issue #1087 Docker Java API client -- added java to Docker Remote API Client document 2013-07-01 11:28:40 -07:00
Victor Vieux 11e28842ac change to top 2013-07-01 15:19:42 +00:00
Michael Crosby b16ff9f859 Add Entrypoint to builder and container config
By setting an entrypoint in the Dockerfile this
allows one to run an image and only pass arguments.
2013-07-01 05:34:27 -09:00
Victor Vieux 348c5c4838 Merge pull request #1085 from dotcloud/1076-doc_delete-fix
fix status code in doc
2013-07-01 06:30:21 -07:00
Victor Vieux 8dcc6a0280 fix status code in doc 2013-07-01 13:28:58 +00:00
Victor Vieux 3b5ad44647 rebase master 2013-07-01 12:31:16 +00:00
Victor Vieux 5e029f7600 Merge pull request #1061 from proppy/fix-slices-ref
api,server: slice are already refs, no need to return ptr
2013-07-01 04:51:56 -07:00
Keli Hu 52cebe19e5 Keep debian package up-to-date 2013-07-01 16:15:56 +08:00
Kimbro Staken d8d33e8b8b Adding check for content-type header 2013-06-30 10:46:09 -07:00
Solomon Hykes b37f7d49d8 Documented release process for maintainers in hack/RELEASE.md 2013-06-29 22:08:25 -07:00
Solomon Hykes d67d5dd963 Merge pull request #1065 from dotcloud/bump_0.4.7
Bump version to 0.4.7
2013-06-29 21:23:59 -07:00
Solomon Hykes 273e0d42b7 * Hack: change builder tests to always use the current unit test image, instead of hardcoding 'docker-ut' 2013-06-29 21:22:15 -07:00
Solomon Hykes ca497a82ab Bump version to 0.4.7 2013-06-29 21:12:29 -07:00
Solomon Hykes b7226316c7 * Hack: move unit tests to a different source image, to work around issues when docker-ut has more than 1 tag. 2013-06-28 19:43:55 -07:00
Guillaume J. Charmes 84f41954ae Merge pull request #1052 from lopter/master
Fix a couple critical bugs on the test suite
2013-06-28 17:00:51 -07:00
Johan Euphrosine 54da339b2c api,server: slice are already refs, no need to return ptr 2013-06-28 12:41:09 -07:00
Sam Alba ac37fcf6f3 Fixed conflicts 2013-06-28 12:36:59 -07:00
Sam Alba 893c974b08 Resolve conflict 2013-06-28 12:32:41 -07:00
Joffrey F 30342efa37 Merge pull request #700 from dotcloud/615-pushbyid
Allow to push/pull on independent registries (by repository or image ID)
2013-06-28 10:29:10 -07:00
Daniel Mizyrycki 6165c246d4 Merge pull request #1057 from dotcloud/973-testing-stabilization
testing|stabilization, issue 973: Use docker-golang PPA and lts-raring kernel
2013-06-28 09:54:06 -07:00
shin- 72befeef24 Fixed issue in registry.GetRemoteTags 2013-06-28 18:42:37 +02:00
Victor Vieux 648c4f198b Add test 2013-06-28 16:27:00 +00:00
Daniel Mizyrycki af2a92f22b testing|stabilization, issue 973: Use docker-golang PPA and lts-raring kernel 2013-06-28 09:23:25 -07:00
shin- ad2f826a82 go fmt pass 2013-06-28 18:19:58 +02:00
shin- e095a1572f Allow push by ID when using a custom registry 2013-06-28 18:19:58 +02:00
shin- c3dd6e1926 Several fixes and updates to make this work with latest changes in master 2013-06-28 18:19:58 +02:00
Guillaume J. Charmes 67ecd2cb82 Reenable writeflusher for pull 2013-06-28 18:19:58 +02:00
Guillaume J. Charmes 57d751c377 Remove https prefix from registry 2013-06-28 18:19:58 +02:00
shin- 50075106b6 Rolled back of previous commit (skip cert verification) 2013-06-28 18:19:58 +02:00
shin- 2a1f8f6fda Ignore 'registry not found' when pushing on independent registries 2013-06-28 18:19:58 +02:00
shin- 1c817913ee Skip certificate check (don't error out on self-signed certs) 2013-06-28 18:19:58 +02:00
shin- de0a48bd6f Tentative support for independent registries 2013-06-28 18:19:58 +02:00
Victor Vieux 8589fd6db8 Add doc 2013-06-28 18:05:41 +02:00
Victor Vieux 2e79719622 add /proc to list running processes inside a container 2013-06-28 15:51:58 +00:00
Tobias Schwab 9bfec5a538 do not merge hostname from image 2013-06-28 15:22:01 +02:00
Victor Vieux a11fc9f067 Merge pull request #1032 from andrewsmedina/govet
following the 'go vet' suggestions for the docker package.
2013-06-28 05:27:53 -07:00
Thatcher e12a204bcc Merge pull request #1028 from dhrp/bugfixes-on-docs
Bugfixes on documentation code
2013-06-27 19:01:13 -07:00
Louis Opter fe014a8e6c Always return the correct test image.
And not a *random* one from its history.
2013-06-27 18:01:20 -07:00
Louis Opter aa8ea84d11 Fix a nil dereference in buildfile_test.go
The test runtime object wasn't properly initialized.
2013-06-27 18:01:10 -07:00
Sam Alba 3175e56ad0 URL schemes of both Registry and Index are now consistent 2013-06-27 17:55:17 -07:00
Guillaume J. Charmes 800d900688 Ignore stderr while doing tests 2013-06-27 15:25:31 -07:00
Guillaume J. Charmes 1a201d2433 Merge pull request #1035 from dotcloud/fix_panic_cast
- Runtime: fix panic with unix socket
2013-06-27 15:22:18 -07:00
Guillaume J. Charmes 750c94efbb Merge pull request #1041 from unclejack/fix_minor_kernel_version_for_git_kernels
remove + from minor kernel version for kernels built from git
2013-06-27 15:21:34 -07:00
Guillaume J. Charmes bd144a64f6 Make sure the ID is displayed usgin run -d 2013-06-27 12:48:25 -07:00
Guillaume J. Charmes 2a20e85203 Improve last log output 2013-06-27 11:10:19 -07:00
unclejack 5ed4386bbf remove + from minor kernel version 2013-06-27 17:51:17 +03:00
Victor Vieux 9d3ec7b39f fix panic with unix socket 2013-06-27 12:57:19 +00:00
Victor Vieux e68a23bdc1 Merge pull request #1019 from dotcloud/1002-change_update_progress_bar_rate-feature
*Remote API: update progressbar every MIN(1%, 512kB)
2013-06-27 04:19:42 -07:00
Andrews Medina 6cf493bea7 following 'go vet' in utils pkg. 2013-06-27 01:40:13 -03:00
Andrews Medina 3d5633a0a0 following the 'go vet' suggestions. 2013-06-27 01:33:55 -03:00
Solomon Hykes c4a44f6f0b Merge pull request #1029 from lopter/master
* Hack: add a script to create the docker-ut image (busybox + socat)
2013-06-26 16:28:58 -07:00
Solomon Hykes 3e29695c1f Merge pull request #602 from gabrtv/111-bind-mounts
+ Runtime: mount volumes from a host directory with 'docker run -b'
2013-06-26 15:59:35 -07:00
Solomon Hykes 46a9f29bae - Runtime: small bugfixes in external mount-bind integration 2013-06-26 15:26:47 -07:00
Gabriel Monroy 67239957c9 - Fix a few bugs in external mount-bind integration 2013-06-26 15:10:38 -07:00
Solomon Hykes d4e62101ab * Runtime: better integration of external bind-mounts (run -b) into the volume subsystem (run -v) 2013-06-26 15:08:07 -07:00
Gabriel Monroy 4fdf11b2e6 + Runtime: mount volumes from a host directory with 'docker run -b' 2013-06-26 15:07:31 -07:00
Guillaume J. Charmes cd0f22ef72 Merge pull request #1005 from dotcloud/1004-stdin_piping-fix
- Runtime: Fix issue when attaching stdin alone
2013-06-26 12:56:14 -07:00
Guillaume J. Charmes 27d6777376 Display containers logs in case of build failure 2013-06-26 12:50:20 -07:00
Louis Opter e5c0b31107 Add a script to create the docker-ut image
It's a fork of the mkimage-busybox.sh script and it adds socat to the
image. (socat being needed to add udp support, see #33).

This script, like mkimage-busybox.sh, probably only works on
Debian/Ubuntu.
2013-06-26 12:35:14 -07:00
Guillaume J. Charmes 5cdbd2ed7a Merge pull request #1021 from errnoh/fix-test-filled-tmpfs
TestKill and TestMultipleContainers: run sleep instead of cat /bin/zero....
2013-06-26 11:59:06 -07:00
Guillaume J. Charmes b44e2e71aa Merge pull request #1010 from dotcloud/1009-testing-hack
Testing|hack, issue #1009: Update make hack environment
2013-06-25 17:07:18 -07:00
Thatcher Peskens 73afc6311d Bugfixes on docs
* fixed canonical link from index
* added http redirect from builder/basics
* fixed url in redirect_home
2013-06-25 15:31:22 -07:00
Guillaume J. Charmes 6127d757a7 Add missing fprintf instead of printf 2013-06-25 10:39:11 -07:00
Erno Hopearuoho fb86dcfb17 TestKill and TestMultipleContainers: run sleep instead of cat /bin/zero. fixes #737 2013-06-25 17:52:10 +03:00
Victor Vieux bccf06c748 update progressbar every MIN(1%, 512kB) 2013-06-25 14:03:15 +00:00
Victor Vieux 862e223cec Merge branch 'add-daemon-storage-path-param' of https://github.com/heavenlyhash/docker into heavenlyhash-add-daemon-storage-path-param 2013-06-25 13:33:45 +00:00
Ken Cochrane e1e2ff52fe Merge pull request #1018 from nahiluhmot/add-swipely-docker-gem
* Documentation: Added Swipely's `docker-api` gem to the table of Remote API Client Libraries.
2013-06-25 05:49:52 -07:00
Tom Hulihan d03edf12e4 Added Swipely's docker-api gem to the table of Remote API Client
Libraries.
2013-06-25 08:26:41 -04:00
Guillaume J. Charmes ec1dfc521c Merge pull request #992 from unclejack/use_numeric_owner_for_tar
* Runtime: use --numeric-owner for Tar and Untar
2013-06-24 18:40:43 -07:00
Guillaume J. Charmes 5190f7f33a Implement regression test for stdin attach 2013-06-24 18:36:04 -07:00
Guillaume J. Charmes 873a5aa8e7 Make NewDockerCli handle terminal 2013-06-24 18:29:08 -07:00
Guillaume J. Charmes 672d3a6c6c Make term function consistent with each other 2013-06-24 18:27:57 -07:00
Guillaume J. Charmes a749fb2130 Make DockerCli use its own stdin/out/err instead of the os.Std* 2013-06-24 18:27:57 -07:00
Guillaume J. Charmes 25d1bc2c09 Fix issue when attaching stdin alone 2013-06-24 18:27:57 -07:00
Daniel Mizyrycki cc63c1b584 Testing|hack, issue #1009: Update make kack environment 2013-06-24 15:01:51 -07:00
Solomon Hykes 145c622aba Merge pull request #990 from dotcloud/fix-tests-cgo
* Hack: remove dependency of unit tests on 'os/user', which cannot be used with CGO_ENABLED=0
2013-06-24 12:31:54 -07:00
Ken Cochrane e2516c01b4 Merge pull request #932 from metalivedev/docs20130614
+ Documentation: Add terminology section
2013-06-24 10:39:25 -07:00
Victor Vieux a3cb18d0f0 Merge pull request #1003 from dotcloud/fix_utils_tests
fix regression in utils tests introduced by #980
2013-06-24 09:14:13 -07:00
Victor Vieux eca9f9c1a1 fix regrettion in utils tests introduced by #980 2013-06-24 16:12:39 +00:00
Daniel Mizyrycki aee845682f Merge pull request #998 from dotcloud/861-hack-vagrant
Fixing hack/Vagrantfile to use uname for aufs linux extras
2013-06-22 20:10:00 -07:00
Anthony Bishopric e3dbe2f2ba Fixing hack/Vagrantfile to use uname for aufs linux extras
Conflicts: hack/Vagrantfile
Resolved by: Daniel Mizyrycki <daniel@dotcloud.com>
2013-06-22 19:58:33 -07:00
Solomon Hykes 193888a2b4 Merge pull request #997 from dotcloud/bump_0.4.6
Bump version to 0.4.6
2013-06-22 13:41:48 -07:00
Solomon Hykes 9fe8bfb2bc Bump version to 0.4.6 2013-06-22 13:36:45 -07:00
Solomon Hykes fc25973371 Merge pull request #996 from dotcloud/995-volumes-crash
- Runtime: fix a bug which caused creation of empty images (and volumes) to crash.
2013-06-22 13:35:26 -07:00
Solomon Hykes f9acd605dc - Runtime: add regression test for issue #995 2013-06-22 13:33:43 -07:00
Solomon Hykes 290b1973a9 Fix a bug which caused creation of empty images (and volumes) to crash. FIxes #995. 2013-06-22 12:29:42 -07:00
unclejack d7d42ff4fe use --numeric-owner for tar and untar 2013-06-22 18:53:10 +03:00
Solomon Hykes ce9e50f4ee Remove dependency on 'os/user', which cannot be used with CGO_ENABLED=0. This allows running the tests without CGO. 2013-06-21 19:40:42 -07:00
Solomon Hykes ecd1fff9b0 Fix formatting in Changelog 2013-06-21 20:22:14 -06:00
Daniel Mizyrycki b0f12bd5e8 Merge pull request #988 from dotcloud/526-packaging-ubuntu
Packaging|Ubuntu, issue #526: Follow init permission pattern for docker.conf
2013-06-21 18:03:12 -07:00
Daniel Mizyrycki 5d61ec11e3 Packaging|Ubuntu, issue #526: Follow init permission pattern for docker.conf 2013-06-21 17:57:45 -07:00
Daniel Mizyrycki 41cdd9b27f Packaging|ubuntu, issue #601: Allow packaging prerm to do its job 2013-06-21 17:37:32 -07:00
Victor Vieux ec6b35240e fix raw terminal 2013-06-22 00:37:02 +00:00
Guillaume J. Charmes c792c0a6c9 Merge pull request #986 from dotcloud/bump_0.4.5
Bump version to 0.4.5
2013-06-21 17:13:38 -07:00
Solomon Hykes d9d2540162 Small copy improvements in Changelog 2013-06-21 17:09:49 -07:00
Guillaume J. Charmes f5d08fc49c Bump version to 0.4.5 2013-06-21 17:01:01 -07:00
Victor Vieux b24759af1c Merge pull request #959 from dotcloud/947-add_ps_size_option
+ Client: Add docker ps -s option to display containers' sizes
2013-06-21 16:10:45 -07:00
Victor Vieux 4d1692726b merge master and add doc 2013-06-22 01:08:20 +02:00
Victor Vieux 1581ed52ba consistent codebase fix 2013-06-21 22:55:33 +00:00
Guillaume J. Charmes de1a5a75cc Merge pull request #848 from dotcloud/builder_server-3
Improve Docker build
2013-06-21 14:55:08 -07:00
Guillaume J. Charmes 169ef21de7 Remove deprecated INSERT from documentation 2013-06-21 14:12:52 -07:00
Guillaume J. Charmes d0fa6927f8 Update api docs 2013-06-21 13:51:48 -07:00
Victor Vieux 63e8a4ac74 Merge pull request #970 from titanous/go1.1-unreachable
Remove code unreachable using Go 1.1
2013-06-21 10:44:40 -07:00
Victor Vieux 459230d3f9 Merge pull request #980 from ToothlessGear/fix-progressbar
* Client: fix progressbar output
2013-06-21 10:42:14 -07:00
Guillaume J. Charmes 070e1aec7e Merge pull request #975 from unclejack/891-mark_command_as_optional
891 mark command as optional for docker run
2013-06-21 10:22:52 -07:00
Marcus Farkas 3ac68f1966 Client: better progressbar output 2013-06-21 17:19:27 +02:00
Victor Vieux 42bcfcc927 add options to docker login 2013-06-21 10:00:25 +00:00
Victor Vieux 5ccde4dffc Merge pull request #801 from dotcloud/build_docker_static
* Makefile: Add link flags in order to link statically and without debug symbols
2013-06-21 02:30:57 -07:00
Victor Vieux dc847001a5 Merge pull request #888 from dotcloud/fix-auth
* Auth: fix auth small issue in case you change your password on index.io
2013-06-21 02:22:01 -07:00
Victor Vieux 639833aaf5 fix tests 2013-06-21 09:20:57 +00:00
Victor Vieux 8f2a80804c Merge branch 'master' into fix-auth 2013-06-21 09:18:03 +00:00
Victor Vieux 78842970cf Merge pull request #976 from dotcloud/fix_doc_post
fix typo in documentation
2013-06-21 02:14:39 -07:00
Victor Vieux 8e7d4cda07 fix doc post 2013-06-21 11:13:13 +02:00
Victor Vieux 5b3ad0023b inverse if 2013-06-21 09:06:09 +00:00
unclejack 6a1279fb90 docs: mark command as optional for docker run 2013-06-21 11:07:14 +03:00
unclejack 66910a7602 mark command as optional for docker run 2013-06-21 11:06:41 +03:00
Solomon Hykes d9bce2defd - Builder: return an error when the build fails 2013-06-20 22:15:19 -07:00
Solomon Hykes 352991bdf4 Merge branch 'simpler-build-upload' (#900) into builder_server-3 (#848) 2013-06-20 22:02:36 -07:00
Solomon Hykes 4383d7b603 Merge pull request #953 from rhysh/952-swapaccount-docs
- Documentation: fix inconsistent/outdated instructions for setting up "swapaccount"
2013-06-20 20:49:44 -07:00
Solomon Hykes 89ae56820a Merge pull request #965 from freegenie/patch-1
* Documentation: use sudo for quick install script
2013-06-20 20:48:42 -07:00
Solomon Hykes 17489cac1a Merge pull request #972 from titanous/update-authors
Update AUTHORS
2013-06-20 20:42:52 -07:00
Solomon Hykes c1a5318d8e Merge branch 'build-add-file' into simpler-build-upload
Conflicts:
	buildfile_test.go
2013-06-20 20:42:19 -07:00
Jonathan Rudenberg b0b690cf23 Update AUTHORS 2013-06-20 23:29:20 -04:00
Solomon Hykes 86e83186b5 Merge branch 'master' into simpler-build-upload
Conflicts:
	commands.go
2013-06-20 20:25:59 -07:00
Solomon Hykes 36d610a388 - Builder: fixed a regression in ADD. Improved regression tests for build behavior. 2013-06-20 20:20:16 -07:00
Jonathan Rudenberg 50b70eeb68 Remove code unreachable using Go 1.1 2013-06-20 23:19:44 -04:00
Solomon Hykes cc0f59742f * Builder: simplified unit tests. The tests are now embedded in the build itself. Yeah baby. 2013-06-20 20:16:39 -07:00
Solomon Hykes 09dd7f14de Merge pull request #969 from dotcloud/fix_logs
- Remote API: Fix a bug which caused 'docker logs' to fail
2013-06-20 18:33:33 -07:00
Guillaume J. Charmes b419699ab8 Use hijack for logs instead of stream 2013-06-20 18:18:36 -07:00
Guillaume J. Charmes 08825fa611 remove unused files 2013-06-20 16:31:11 -07:00
Solomon Hykes 02f0c1e46d Bump version to 0.4.4 2013-06-20 14:33:59 -07:00
Eric Myhre e44f62a95c Add argument to allow setting base directory for docker daemon's storage to values other than "/var/lib/docker". 2013-06-20 16:29:54 -05:00
Solomon Hykes dbfb3eb923 - Builder: hotfix for bug introduced in 3adf9ce04e 2013-06-20 14:29:34 -07:00
Solomon Hykes e43323221b Merge branch 'master' into simpler-build-upload
Conflicts:
	api.go
	builder_client.go
	commands.go
2013-06-20 14:19:09 -07:00
Fabrizio Regini da06349723 Update README.md 2013-06-20 23:15:38 +02:00
Solomon Hykes cff2187a4c Fixed API version numbers in api docs 2013-06-20 12:30:02 -07:00
Guillaume J. Charmes a078d3c872 Merge pull request #950 from dotcloud/bump_0.4.3
Bumped version to 0.4.3
2013-06-20 12:24:55 -07:00
Guillaume J. Charmes da5bb4db96 Bumped version to 0.4.3 2013-06-20 12:23:14 -07:00
Daniel Mizyrycki 1b19939742 Merge pull request #946 from unclejack/speed_up_dockerbuilder_image_creation
dockerbuilder : batch apt-get install operations for speed
2013-06-20 11:51:43 -07:00
Guillaume J. Charmes 930e1d8830 Merge pull request #941 from dotcloud/makefile_test_subpackages
gofmt and test sub directories in makefile
2013-06-20 11:18:37 -07:00
Guillaume J. Charmes fa68fe6ff3 Merge pull request #938 from dotcloud/add_unix_socket-feature
* Runtime: Add unix socket and multiple -H
2013-06-20 11:17:16 -07:00
Guillaume J. Charmes 21a5a6202d Merge pull request #907 from dotcloud/go1.1_cookie_jar-feature
* Runtime: use go 1.1 cookiejar and remove ResetClient
2013-06-20 10:48:36 -07:00
Solomon Hykes db60337598 Makefile: added missing -a option 2013-06-20 10:39:09 -07:00
Guillaume J. Charmes c5be64fec4 Add link flags in order to link statically and without debug symbols 2013-06-20 10:33:54 -07:00
Guillaume J. Charmes 659e846006 Merge branch 'master' into builder_server-3
Conflicts:
	docs/sources/use/builder.rst
2013-06-20 10:27:12 -07:00
Solomon Hykes d8f56352da Merge pull request #961 from dotcloud/933-warning_rm-running
* Runtime: refuse to remove a running container
2013-06-20 10:25:02 -07:00
Guillaume J. Charmes d1a3d020aa Merge pull request #913 from dotcloud/fix_detach_eof
- Runtime: Impossible to detach from attached container fix
2013-06-20 10:21:19 -07:00
Guillaume J. Charmes 8807b7dd46 Merge pull request #909 from dotcloud/fix_auth_tests
Fix the auth tests
2013-06-20 10:14:55 -07:00
Daniel Mizyrycki cd155a1f25 Merge pull request #962 from dotcloud/960-packaging-ubuntu
Packaging|ubuntu, issue #960: Add docker PPA staging in release process
2013-06-20 09:03:15 -07:00
Daniel Mizyrycki d8887f3488 Packaging|ubuntu, issue #960: Add docker PPA staging in release process 2013-06-20 08:57:28 -07:00
Victor Vieux 1c841d4fee add warning when you rm a running container 2013-06-20 15:45:30 +00:00
Victor Vieux da199846d2 use strconv.ParseBool in getBoolParam 2013-06-20 14:34:58 +00:00
Victor Vieux bd04d7d475 add ps -s 2013-06-20 14:19:50 +00:00
Victor Vieux 5f93aa0ecf rebase master 2013-06-20 13:56:36 +00:00
Victor Vieux 05796bed57 update docs 2013-06-20 12:34:08 +00:00
Solomon Hykes 8a131dffb6 Merge pull request #948 from dotcloud/registry_pathencode
* Registry: Use opaque requests when we need to preserve urlencoding in registry requests
2013-06-19 22:41:16 -07:00
Solomon Hykes 79efcb545d Merge branch 'master' into simpler-build-upload 2013-06-19 18:48:19 -07:00
Daniel Mizyrycki 88dcba3482 Packaging|ubuntu, issue #954: Generate debian/changelog from main CHANGELOG.md 2013-06-19 16:32:51 -07:00
Guillaume J. Charmes 754609ab69 Merge pull request #945 from globalcitizen/master
Security warnings in LXC configuration
2013-06-19 15:06:48 -07:00
Solomon Hykes d6ab71f450 * Remote API: updated docs for 1.3 2013-06-19 15:03:33 -07:00
Solomon Hykes 55edbcd02f * Builder: remove duplicate unit test 2013-06-19 14:59:42 -07:00
Solomon Hykes 90dde9beab *Builder: warn pre-1.3 clients that they need to upgrade. This breaks semver, but our API should still be in 0.X versioning, in which case semver allows breaking changes. 2013-06-19 14:59:28 -07:00
Rhys Hiltner 5fc1329b2f the kernel needs "swapaccount=1" set - some docs are updated, this one seems to have slipped through
Fixes #952
2013-06-19 14:45:03 -07:00
Solomon Hykes 9c8085a0aa Merge pull request #951 from dotcloud/add-fix
* Builder: correct the behavior of ADD when copying directories.
2013-06-19 14:36:09 -07:00
Solomon Hykes 507ea757a5 * Builder: correct the behavior of ADD when copying directories. 2013-06-19 14:26:11 -07:00
Guillaume J. Charmes 7e065aaacd Merge pull request #917 from dotcloud/pull_pool
- Runtime: Forbid parralel push/pull for a single image/repo. Fixes #311
2013-06-19 14:11:29 -07:00
shin- 0312bbc535 Use opaque requests when we need to preserve urlencoding in registry requests 2013-06-19 13:49:45 -07:00
Solomon Hykes a056f1deec Merge pull request #924 from eliasp/remove-ifconfig-usage
* Documentation: replace `ifconfig` in docs with `iproute`
2013-06-19 13:20:35 -07:00
Solomon Hykes fdaefe6997 Merge pull request #944 from hansent/patch-1
* Documentation: use https repo url to clone for dev setup instructions
2013-06-19 13:17:08 -07:00
unclejack 88279439af batch apt-get install operations for speed
The dockerbuilder Dockerfile was installing one package per apt-get
install operation.

This changes it so that consecutive run apt-get install operations are
batched into a single operation.
2013-06-19 22:07:56 +03:00
Victor Vieux 2d6a49215c add testall rule 2013-06-19 18:21:53 +00:00
Guillaume J. Charmes a7e14a3065 hotfix: nil pointer uppon some registry error 2013-06-19 11:08:19 -07:00
Guillaume J. Charmes a660cc0d01 Merge pull request #934 from dotcloud/fix-add-behavior
* Build: Stabilize ADD behavior
2013-06-19 10:56:39 -07:00
globalcitizen 788d66f409 Add note about lxc.cap.keep > lxc.cap.drop 2013-06-20 00:39:35 +07:00
globalcitizen 96988a37f5 Add healthy procfs/sysfs warnings 2013-06-20 00:37:08 +07:00
Solomon Hykes b368d21568 Merge branch 'master' into fix-add-behavior 2013-06-19 10:31:50 -07:00
Thomas Hansen c88b763e80 use https repo url to clone for dev setup instructions
the git clone line in the dev setup instructions does not work as is, unless the user has write access
2013-06-19 11:38:58 -05:00
Victor Vieux ec3c89e57c Merge pull request #849 from dotcloud/improve_progressbar_pull
* Client: HumanReadable ProgressBar sizes in pull
2013-06-19 08:02:40 -07:00
Victor Vieux 5dcab2d361 gofmt and test sub directories in makefile 2013-06-19 14:50:58 +00:00
Victor Vieux 5f7e98be20 Merge pull request #930 from andrewmunsell/patch-1
Fix Mac OS X installation instructions URL
2013-06-19 07:31:24 -07:00
Victor Vieux d52af3f58f Merge branch 'master' into add_unix_socket-feature 2013-06-19 12:49:27 +00:00
Victor Vieux 063c838c92 update docs 2013-06-19 12:48:50 +00:00
Victor Vieux 9632bf2287 add tests 2013-06-19 12:40:01 +00:00
Victor Vieux dede1585ee add the possibility to use multiple -H 2013-06-19 12:31:54 +00:00
Solomon Hykes 5be7b9af3e * Builder: fixed the behavior of ADD to be (mostly) reverse-compatible, predictable and well-documented. 2013-06-18 20:28:49 -07:00
Andy Rothfusz 5183399f50 Added multilayer example image. 2013-06-18 19:31:35 -07:00
Andy Rothfusz a780b7c6b5 New Terminology section and illustrations. 2013-06-18 19:31:35 -07:00
Daniel Mizyrycki 0ae778c881 Merge pull request #788 from samjsharpe/master
Vagrantfile: Add support for VMWare Fusion provider
2013-06-18 18:35:25 -07:00
Andrew Munsell 1f8b679b18 Fix Mac OS X installation instructions URL 2013-06-18 19:19:07 -06:00
Guillaume J. Charmes ee5df76579 Merge pull request #885 from dotcloud/remove_bsdtar
* Runtime: Remove bsdtar dependency
2013-06-18 17:24:26 -07:00
Guillaume J. Charmes b431720dac Merge branch 'remove_bsdtar' of https://github.com/dotcloud/docker into remove_bsdtar 2013-06-18 17:23:22 -07:00
Guillaume J. Charmes 42ce68894a Fix issue within TestDelete. The archive is now consumed by graph functions 2013-06-18 17:22:32 -07:00
Guillaume J. Charmes c063fc0238 Merge branch 'master' into fix_detach_eof
Conflicts:
	commands.go
2013-06-18 17:15:31 -07:00
Guillaume J. Charmes 0a9ac63a05 Merge pull request #916 from dotcloud/race_attach-fix
- Runtime: Fix race condition within Run command when attaching.
2013-06-18 17:13:38 -07:00
Guillaume J. Charmes 6dccdd657f remove offline mode from auth unit tests 2013-06-18 17:09:47 -07:00
Guillaume J. Charmes 34a434616a Merge branch 'master' into builder_server-3
Conflicts:
	buildfile.go
2013-06-18 16:12:30 -07:00
Elias Probst bc9b91e501 Use the canonical 'ip' commands to make it easier for new 'iproute2' users to understand the usage. 2013-06-19 00:57:43 +02:00
Solomon Hykes edbd3da33a Merge pull request #927 from dotcloud/nicer-build-output
* Builder: nicer output for 'docker build'
2013-06-18 15:48:00 -07:00
Guillaume J. Charmes 32e8f9beca Merge pull request #918 from dotcloud/hisotry_lookup
Add image lookup to history command
2013-06-18 15:36:05 -07:00
Guillaume J. Charmes 84ceeaa870 Update documentaiton 2013-06-18 14:36:35 -07:00
Solomon Hykes cdeaba2acf Updated FIXME 2013-06-18 13:02:12 -07:00
Solomon Hykes c0b82bd807 Fix incorrect docs for 'docker build' 2013-06-18 12:52:37 -07:00
Solomon Hykes 88e35b6f80 Merge pull request #926 from josephholsten/fix-znc-example
- Documentation: fix missing command in irc bouncer example
2013-06-18 12:37:21 -07:00
Guillaume J. Charmes 6e17cc45ea Fix merge issue 2013-06-18 12:33:06 -07:00
Solomon Hykes cb9d0fd3bc Nicer output for 'docker build' 2013-06-18 12:26:56 -07:00
Victor Vieux 3adf9ce04e add basic support for unix sockets 2013-06-18 18:59:56 +00:00
Elias Probst c2e95997d4 Fixed #923 by replacing the usage of 'ifconfig' with 'ip a' where appropriate and added a note to use 'ip a' instead of 'ifconfig' for a screencast transscript. 2013-06-18 19:55:59 +02:00
Guillaume J. Charmes 808faa6371 * API: Send all tags on History API call 2013-06-18 10:31:07 -07:00
Solomon Hykes 6f511ac29b Remove bsdtar dependency in various install scripts 2013-06-18 10:23:45 -07:00
Guillaume J. Charmes 3dc93e390a Remove useless goroutine 2013-06-18 10:10:03 -07:00
Guillaume J. Charmes e2d034e488 Remove useless goroutine 2013-06-18 10:06:26 -07:00
Guillaume J. Charmes 86205540d8 Merge branch 'master' into race_attach-fix 2013-06-18 10:03:34 -07:00
Andy Rothfusz 702c3538a4 Merge pull request #921 from dhrp/docs-redirects-and-fixes
Fixes on documentation. LGTM
2013-06-18 09:58:24 -07:00
Victor Vieux 069a7c1e99 Merge pull request #914 from ToothlessGear/fix-version-output
* Client: Fix docker version's git commit output
2013-06-18 05:56:42 -07:00
Daniel Mizyrycki 2e7649beda Merge pull request #920 from dotcloud/919-packaging
Packaging, issue 919: Bump version to 0.4.2
2013-06-18 01:08:03 -07:00
Sam J Sharpe 8281a0fa1c Vagrantfile: Add support for VMWare Fusion provider
As a user who has blown $150 on VMWare Fusion and vagrant-vmware, I
would like to use my new shiny to hack on Docker. Docker already has a
multi-provider Vagrantfile, so adding another one presents little risk.

Known Issues:

- The docker install of a new kernel breaks the Vagrant shared folder.
    - This seems to be because the VMWare hgfs module doesn't build
      against a 3.8 kernel.
    - I don't believe that shared folder support is actually in use
2013-06-18 06:19:14 +01:00
Thatcher Peskens 3491d7d2f1 Fixed on documentation.
* replaced previously removed concepts/containers and concepts/introcution by a redirect
* moved orphan index/varable to workingwiththerepository
* added favicon to the layout.html
* added redirect_home which is a http refresh redirect. It works like a 301 for google
* fixed an issue in the layout that would make it break when on small screens
2013-06-17 20:16:56 -07:00
Daniel Mizyrycki e664a46ff3 Packaging, issue 919: Bump version to 0.4.2 2013-06-17 19:50:31 -07:00
Solomon Hykes 0809f649d3 * Builder: upload progress bar
Fix progress bar
2013-06-17 18:49:16 -07:00
Guillaume J. Charmes 02a002d264 Update documentation 2013-06-17 18:41:13 -07:00
Guillaume J. Charmes 3bfc822578 * API: Add tag lookup to history command. Fixes #882 2013-06-17 18:39:30 -07:00
Guillaume J. Charmes 02c291d13b Fix bug on compression detection when chunck < 10bytes 2013-06-17 18:11:58 -07:00
Marcus Farkas b25bcf1a66 fix docker version git output 2013-06-17 23:32:48 +00:00
Guillaume J. Charmes fe204e6f48 - Runtime: Forbid parralel push/pull for a single image/repo. Fixes #311 2013-06-17 16:10:00 -07:00
Guillaume J. Charmes 2b6ca38728 Remove Run race condition 2013-06-17 15:45:08 -07:00
Guillaume J. Charmes c106ed32ea Move the attach prevention from server to client 2013-06-17 15:40:04 -07:00
Joseph Anthony Pasquale Holsten 2626d88a21 fix missing command in irc bouncer example 2013-06-17 14:50:58 -07:00
Guillaume J. Charmes 3a0ffbc772 - Runtime: Fixes #884 enforce stdout/err sync by merging the stream 2013-06-17 14:44:35 -07:00
Daniel Mizyrycki bd9bf9b646 Packaging|dockerbuilder, issue #761: use docker-golang PPA. Add Dockerfile header 2013-06-17 14:08:50 -07:00
Victor Vieux 7b6f50772c Merge pull request #912 from dotcloud/bump_0.4.1
Bumped version to 0.4.1
2013-06-17 14:06:17 -07:00
Guillaume J. Charmes 555552340d Merge branch 'master' into builder_server-3
Conflicts:
	buildfile_test.go
2013-06-17 14:01:32 -07:00
Solomon Hykes 6e2c32eb9a Merge pull request #911 from dotcloud/add_port_redirection_doc
* Documentation: add port redirection doc
2013-06-17 13:57:08 -07:00
Solomon Hykes 22b0a38df5 Merge pull request #897 from dotcloud/fix-overlapping-add
* Builder: ADD improvements: use tar for copy + automatically unpack local archives
2013-06-17 13:32:34 -07:00
Solomon Hykes cb58e63fc5 Typo 2013-06-17 14:28:04 -06:00
Solomon Hykes 8626598753 Added content to port redirect doc 2013-06-17 13:25:50 -07:00
Victor Vieux 36231345f1 add port redirection doc 2013-06-17 22:05:58 +02:00
Victor Vieux e8f001d451 Bumped version to 0.4.1 2013-06-17 19:15:21 +00:00
Guillaume J. Charmes 13e03a6911 Fix the auth tests and add the offline mode 2013-06-17 11:29:02 -07:00
Victor Vieux fde82f448f use go 1.1 cookiejar and revome ResetClient 2013-06-17 18:13:40 +00:00
Guillaume J. Charmes 79b3265ef1 Merge branch 'master' into builder_server-3
Conflicts:
	buildfile.go
2013-06-17 11:09:53 -07:00
Daniel Mizyrycki 389db5f598 Merge pull request #887 from dotcloud/761-packaging-dockerbuilder
Packaging, dockerbuilder: Automate pushing docker binary packages
2013-06-17 08:40:01 -07:00
Solomon Hykes fe88b5068d Merge branch 'master' into simpler-build-upload 2013-06-15 12:35:26 -07:00
Solomon Hykes 6746c385bd FIXMEs 2013-06-15 12:24:20 -07:00
Solomon Hykes f50e40008f * Builder: added a regression test for #895 2013-06-15 11:35:56 -07:00
Solomon Hykes 061f8d12e0 * Builder: reorganized unit tests for better code reuse, and to test non-empty contexts 2013-06-15 11:07:49 -07:00
Solomon Hykes 38554fc2a7 * Builder: simplify the upload of the build context. Simply stream a tarball instead of multipart upload with 4 intermediary buffers. Simpler, less memory usage, less disk usage, and faster. 2013-06-15 09:38:18 -07:00
Solomon Hykes cc7de8df75 Removed deprecated file builder_client.go 2013-06-15 09:30:52 -07:00
Solomon Hykes 30f604517a Merge pull request #895 from dotcloud/build-fixes
- Builder: fix a bug which caused builds to fail if ADD was the first command
2013-06-15 09:23:41 -07:00
Solomon Hykes 080f35fe65 Fix a bug which caused builds to fail if ADD was the first command 2013-06-15 09:16:35 -07:00
Guillaume J. Charmes 78f86ea502 Merge branch 'master' into builder_server-3
Conflicts:
	utils/utils.go
2013-06-14 17:08:39 -07:00
Solomon Hykes 5b8287617d + Builder: ADD of a local file will detect tar archives and unpack them
into the container instead of copying them as a regular file.

* Builder: ADD uses tar/untar for copies instead of calling 'cp -ar'.
	This is more consistent, reduces the number of dependencies, and
	fixe #896.
2013-06-14 16:43:39 -07:00
Solomon Hykes 5799806414 FIXMEs 2013-06-14 16:29:19 -07:00
Guillaume J. Charmes 76a568fc97 Fix merge issue 2013-06-14 16:08:08 -07:00
Solomon Hykes 14265d9a18 Various FIXME items 2013-06-14 15:11:34 -07:00
Solomon Hykes 17235eb089 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-14 15:07:05 -07:00
Solomon Hykes 7f118519eb Remove duplicate 'WARNING' 2013-06-14 14:46:08 -07:00
Solomon Hykes 250e47e2eb Merge branch 'dns_server_side'
+ Configure dns configuration host-wide with 'docker -d -dns'
+ Detect faulty DNS configuration and replace it with a public default
2013-06-14 14:39:05 -07:00
Guillaume J. Charmes f413fb8e56 Merge pull request #857 from edx/856-vagrant-port-forwarding
* Vagrantfile: Add an option to forward all ports to the vagrant host that have been ex...
2013-06-14 14:37:55 -07:00
Guillaume J. Charmes f0e43dcdb1 Merge pull request #607 from dotcloud/expose_api_port_vagrant-feature
* Vagrantfile: Add the rest api port to vagrantfile's port_forward
2013-06-14 14:35:53 -07:00
Guillaume J. Charmes abf85b2508 Merge branch 'master' into remove_bsdtar
Conflicts:
	docs/sources/contributing/devenvironment.rst
2013-06-14 14:34:30 -07:00
Guillaume J. Charmes 813771e6b7 Merge pull request #892 from unclejack/validate_memory_limits
* Runtime: validate memory limits & error out if it's less than 524288
2013-06-14 14:32:28 -07:00
unclejack d3f83a6592 add test: fail to create container if mem limit < 512KB 2013-06-14 22:55:00 +03:00
Andy Rothfusz 7958f1f694 Add examples for local import. 2013-06-14 13:42:59 -06:00
Guillaume J. Charmes 4a02c6dab1 Merge pull request #816 from unclejack/524-fix_aufs_links_related_warnings
524 fix aufs links related warnings
2013-06-14 12:32:47 -07:00
Guillaume J. Charmes 165d343d06 Merge pull request #663 from dotcloud/662-fix_push_html_404-fix
* Registry: add regexp check on repo's name
2013-06-14 12:30:44 -07:00
Guillaume J. Charmes 60fd7d686d Merge branch 'master' into improve_progressbar_pull 2013-06-14 12:01:40 -07:00
Solomon Hykes c701de939f Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-14 11:58:46 -07:00
Guillaume J. Charmes 05b87d2d5b Merge pull request #868 from dotcloud/postupload-endpoints-header
- Registry: Send X-Docker-Endpoints at the end of a push
2013-06-14 11:53:54 -07:00
Guillaume J. Charmes 78e4a385f7 Merge branch 'master' into postupload-endpoints-header
Conflicts:
	server.go
2013-06-14 11:50:58 -07:00
unclejack 822abab17e install aufs-tools when setting up the testing vagrant box 2013-06-14 21:41:12 +03:00
unclejack f1d16ea003 install aufs-tools when setting up the hack vagrant box 2013-06-14 21:41:12 +03:00
unclejack fb7eaf67d1 add aufs-tools package to dev env docs page 2013-06-14 21:41:12 +03:00
unclejack e53721ef69 add aufs-tools to lxc-docker dependencies 2013-06-14 21:38:15 +03:00
unclejack 2f67a62b5b run auplink before unmounting aufs 2013-06-14 21:38:15 +03:00
Guillaume J. Charmes 79fe864d9a Update docs 2013-06-14 10:58:16 -07:00
Guillaume J. Charmes 6f7de49aa8 Add unit tests for tar/untar with multiple compression + detection 2013-06-14 10:47:49 -07:00
unclejack 9ee11161bf validate memory limits & error out if less than 512 KB 2013-06-14 19:52:44 +03:00
Victor Vieux 90f6bdd6e4 update docs, remove config file on 401 2013-06-14 13:38:51 +00:00
Victor Vieux e49f82b9e1 update docs 2013-06-14 10:10:26 +00:00
Victor Vieux ddf5a1940f Merge branch 'master' into 22-add_sizes_images_and_containers-feature 2013-06-14 10:05:06 +00:00
Victor Vieux 00cf2a1fa2 fix virtual size on images 2013-06-14 10:05:01 +00:00
Victor Vieux 9cc72ff1a9 fix auth in case you change your password on index.io 2013-06-14 09:53:48 +00:00
Daniel Mizyrycki 3384943cd3 Packaging, dockerbuilder: Automate pushing docker binary packages 2013-06-13 22:14:43 -07:00
Guillaume J. Charmes 2f14dae83f Add build UT 2013-06-13 18:52:41 -07:00
Guillaume J. Charmes f03ebc20aa Fix issue with ADD 2013-06-13 18:42:27 -07:00
Guillaume J. Charmes 4b4918f2a7 Merge branch 'master' into builder_server-3
Conflicts:
	buildfile.go
	commands.go
	docs/sources/api/docker_remote_api.rst
2013-06-13 18:11:22 -07:00
Guillaume J. Charmes 0425f65e63 Remove bsdtar by checking magic 2013-06-13 17:53:38 -07:00
Guillaume J. Charmes 452128f0da Remove run() where it is not needed within the builder 2013-06-13 15:18:15 -07:00
Guillaume J. Charmes f5fe3ce34e Remove run from non-running commmands 2013-06-13 15:08:53 -07:00
Guillaume J. Charmes d0084ce5f2 Remove run from the ADD instruction 2013-06-13 14:57:50 -07:00
Guillaume J. Charmes 2eaa0a1dd7 Fix non-tty run issue 2013-06-13 12:57:35 -07:00
Guillaume J. Charmes 8085754507 Merge pull request #751 from dotcloud/660-auth_client-feature
* Registry: Move auth to the client
2013-06-13 11:52:40 -07:00
Victor Vieux c46382ba29 rebase master 2013-06-13 17:58:06 +00:00
Guillaume J. Charmes b38c6929be Updated build usage 2013-06-13 10:50:55 -07:00
Guillaume J. Charmes 42d1c36a5c Fix merge issue 2013-06-13 10:25:43 -07:00
Guillaume J. Charmes 51a4b65101 Merge pull request #883 from unclejack/build-docker-with-go1.1.1
use Go 1.1.1 to build docker
2013-06-13 10:20:38 -07:00
Guillaume J. Charmes 30fb45c494 Merge pull request #799 from dotcloud/691-run_id-feature
* Runtime: allow docker run <name>:<id>
2013-06-13 10:14:40 -07:00
Victor Vieux 9cdd39e0d7 Merge branch 'master' into 691-run_id-feature 2013-06-13 13:18:43 +00:00
Victor Vieux 45a8945746 added test 2013-06-13 13:17:56 +00:00
Victor Vieux 697282d6ad Merge pull request #804 from dotcloud/no_stdout_stale-fix
*Runtime: Fix stale command when stdout is not allocated
2013-06-13 04:22:29 -07:00
unclejack 78a76ad50e use Go 1.1.1 to build docker 2013-06-13 08:59:41 +03:00
Solomon Hykes 5ecfe13be9 Merge branch '610-improve_rmi-feature'
* Runtime: improved image removal to garbage-collect unreferenced parents
- Runtime: fixed image removal to cleanly remove tags and repositories
2013-06-12 20:30:07 -07:00
Guillaume J. Charmes 0bc1c6d57a Merge pull request #826 from dotcloud/825-move_xino_shm-fix
- Runtime: fix aufs mount on ubuntu13.04+btrfs
2013-06-12 17:20:42 -07:00
Solomon Hykes f57175cbad FIXME: a loose collection of FIXMEs for internal use by the maintainers 2013-06-12 15:28:59 -07:00
Sam Alba 81a11a3c30 Update NOTICE 2013-06-12 15:50:30 -06:00
Sam Alba 04cca097ae Update README.md 2013-06-12 15:50:09 -06:00
Andy Rothfusz 48897b5fa1 Merge pull request #845 from unclejack/841-update_docs_no_add_without_context
841 - docs: warn about the transmission of data to the docker daemon & ADD without context
2013-06-12 14:25:44 -07:00
Solomon Hykes ecae342434 New roadmap item: advanced port redirections 2013-06-12 10:50:47 -07:00
Victor Vieux f2383151cb bump to master 2013-06-12 17:39:32 +00:00
Solomon Hykes b4565af256 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-12 10:23:14 -07:00
Guillaume J. Charmes c85e775162 Merge pull request #844 from dotcloud/843-inspect_multiple_params-feature
* Runtime: allow multiple params in inspect
2013-06-12 10:18:42 -07:00
Guillaume J. Charmes 3491df6edb Merge pull request #852 from dotcloud/556-docker-search-fmt
Remove CR/NL from description in docker CLI
2013-06-12 10:17:05 -07:00
Guillaume J. Charmes 0e6ec57996 Merge pull request #874 from fsouza/fix-build-newline
- Builder: don't ignore last line in Dockerfile when it doesn't end with \n
2013-06-12 10:15:00 -07:00
Guillaume J. Charmes f37b158982 Merge pull request #877 from fsouza/fix-hijack
- Runtime: use in instead of os.Stdin in hijack
2013-06-12 10:14:37 -07:00
Francisco Souza da54abaf2e commands: use in instead of os.Stdin in hijack 2013-06-12 09:54:37 -03:00
Solomon Hykes 092c761cec Merge pull request #853 from kencochrane/registry-api-1.1-fix
* Documentation: separate the registry and index API's into their own docs
2013-06-11 18:34:10 -07:00
Solomon Hykes 5edafd6284 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-11 11:21:57 -07:00
Solomon Hykes d64f105b44 Added a readme explaining the role of each API 2013-06-11 10:39:02 -07:00
Victor Vieux 2d5eda5141 Merge pull request #864 from dotcloud/851-choose_public_port-feature
* Runtime: you can now specify public port (ex: -p 80:4500)
2013-06-11 10:11:10 -07:00
Solomon Hykes be15d5f2d9 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-11 10:09:34 -07:00
Solomon Hykes 5918a5a322 More principles. Raw and unstructured to spawn discussion. 2013-06-11 09:27:36 -07:00
Solomon Hykes f8af296e6f Merge pull request #865 from dotcloud/errors_commands-fix
Display StatusText as error when empty body in commands.go
2013-06-11 09:16:54 -07:00
Solomon Hykes 432e18990b Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-11 08:58:23 -07:00
Francisco Souza 2e9403b047 build: don't ignore last line in Dockerfile when it doesn't end with \n 2013-06-11 11:39:06 -03:00
Victor Vieux 3ea6a2c7c3 add Michael Crosby to AUTHORS 2013-06-11 10:17:39 +00:00
Victor Vieux 20bf0e00e8 * Remote Api: Add flag to enable cross domain requests 2013-06-11 10:12:36 +00:00
Michael Crosby dd53c457d7 Add OPTIONS to route map
Move the OPTIONS method registration into the existing
route map.  Also add support for empty paths in
the map.
2013-06-10 16:10:40 -09:00
Michael Crosby ac599d6528 Add explicit status response to OPTIONS handler
Write the http.StatusOK header in the OPTIONS
handler and update the unit tests to refer to the
response code using the const from the http package.
2013-06-10 14:44:10 -09:00
Andy Rothfusz ca4597e9d7 Add links to libraries, fix #800 2013-06-10 15:22:34 -07:00
Andy Rothfusz eeea9ac946 Add list of Docker Remote API Client Libraries. Fixes #800. 2013-06-10 15:17:27 -07:00
Michael Crosby 0a28628c02 Add Cors and OPTIONS route unit tests
Move creating the router and populating the
routes to a separate function outside of
ListenAndServe to allow unit tests to make
assertions on the configured routes and handler
funcs.
2013-06-10 13:02:40 -09:00
Victor Vieux bcc4754dc1 Merge pull request #869 from fsouza/fix-api-docs
docs/api/remote: fix rst syntax in the "Search images" section
2013-06-10 14:21:39 -07:00
Victor Vieux 66d9a73362 rebump 2013-06-10 21:05:54 +00:00
Andy Rothfusz 5712e37437 Merge pull request #840 from dhrp/just-fixed-some-links
Fixed some links. Closes #839 #838 #835
2013-06-10 13:51:43 -07:00
Francisco Souza b1ed75078e docs/api/remote: fix rst syntax in the "Search images" section 2013-06-10 16:07:57 -03:00
Joffrey F 47d7486bbe Merge pull request #814 from dotcloud/708-pushpull-multislash
Support for special namespace 'src' (highland support)
2013-06-10 11:29:39 -07:00
shin- d227af1edd Escape remote names on repo push/pull 2013-06-10 11:28:27 -07:00
shin- 4e18010731 Support for special namespace 'src' (highland support) 2013-06-10 11:28:26 -07:00
shin- db3242e4bb Send X-Docker-Endpoints header when validating the images upload with the index at the end of a push 2013-06-10 11:21:56 -07:00
Guillaume J. Charmes 7169212683 Fix typo 2013-06-10 11:08:40 -07:00
Guillaume J. Charmes 2a6a1d439c Merge pull request #867 from Turbo87/patch-1
Fixed broken link in README
2013-06-10 10:57:09 -07:00
Guillaume J. Charmes 8984aef899 Fix typo in docs 2013-06-10 09:32:31 -07:00
Guillaume J. Charmes b103ac70bf Allow multiple tab/spaces between instructions and arguments 2013-06-10 09:31:59 -07:00
Tobias Bieniek 37c20fa64b Fixed broken link in README 2013-06-10 19:03:54 +03:00
Victor Vieux ab0d0a28a8 fix errors when no body 2013-06-10 15:06:52 +00:00
Victor Vieux 0de3f1ca9a add tests 2013-06-10 14:14:54 +00:00
Victor Vieux 95d66ebc6b specify public port 2013-06-10 13:56:43 +00:00
Michael Crosby 393e873d25 Add Access-Control-Allow-Methods header
Add the Access-Control-Allow-Methods header so that
DELETE operations are allowed.

Also move the write CORS headers method before
docker writes a 404 not found so that the client
receives the correct response and not an invalid
CORS request.
2013-06-09 17:17:35 -09:00
Guillaume J. Charmes 956491f853 Merge pull request #855 from samjsharpe/fix_missing_hyphen
Build from Dockerfile on stdin requires a hyphen
2013-06-07 13:04:27 -07:00
Calen Pennington 302660e362 Add an option to forward all ports to the vagrant host that have been exported from docker containers 2013-06-07 15:56:39 -04:00
Sam J Sharpe 5e6cd21f8b Build from Dockerfile on stdin requires a hypen
There is a missing hypen in the documentation:
    `docker build < Dockerfile` will complain
    `docker build - < Dockerfile` will not complain
2013-06-07 20:35:34 +01:00
Ken Cochrane 9e1cd37bbc seperated the registry and index API's into their own docs
seperated the registry and index API's into their own docs and merged
in the index search api into the index api. Also renamed the original
registry api to registry_index_spec.
2013-06-07 13:42:52 -04:00
shin- 8d4282cd36 Remove CR/NL from description in docker CLI. Also moved description shortening to the client 2013-06-07 06:09:24 -07:00
Guillaume J. Charmes 1e0738f63f Make the progressbar human readable 2013-06-06 18:42:52 -07:00
Guillaume J. Charmes f355d33b5f Make the progressbar take the image size into consideration 2013-06-06 18:16:16 -07:00
Solomon Hykes 968e08a9ba Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-07 02:41:08 +02:00
Guillaume J. Charmes 2cc22de696 Update documentation for docker build 2013-06-06 16:48:36 -07:00
Guillaume J. Charmes 12c9b9b3c9 Implement build from git 2013-06-06 16:41:41 -07:00
Guillaume J. Charmes a11e61677c Move the docker build URL form client to server, prepare for GIT support 2013-06-06 16:09:46 -07:00
Guillaume J. Charmes 01f446e908 Allow to docker build URL 2013-06-06 15:56:09 -07:00
Guillaume J. Charmes f4a4cfd2cc Move isUrl to utils.IsURL 2013-06-06 15:50:09 -07:00
Guillaume J. Charmes eaa2183d77 Fix issue EXPOSE override CMD within builder 2013-06-06 15:48:12 -07:00
Guillaume J. Charmes 31d2b258c1 Allow remote url to be passed to the ADD instruction within the builder 2013-06-06 15:40:46 -07:00
unclejack 4b3a381f39 docs: build: ADD copies just needed data w/ full path 2013-06-07 00:39:43 +03:00
Solomon Hykes 56473d4cce Typo in MAINTAINERS file 2013-06-06 22:52:55 +02:00
unclejack efa7ea592c docs: warn about build data tx & ADD w/o context
This updates the documentation to mention that:
1. a lot of data may get sent to the docker daemon if there is a lot of
data in the directory passed to docker build
2. ADD doesn't work in the absence of the context
3. running without a context doesn't send file data to the docker
daemon
4. explain that the data sent to the docker daemon will be used by ADD
commands
2013-06-06 22:06:12 +03:00
Guillaume J. Charmes afd325a884 Solve an issue with the -dns in daemon mode 2013-06-06 11:01:29 -07:00
Guillaume J. Charmes a3f6054f97 Check for local dns server and output a warning 2013-06-06 11:01:09 -07:00
Sam Alba da937bf214 Update README.md 2013-06-06 11:09:11 -06:00
Solomon Hykes 42b63eb818 Daniel Mizyrycki is maintainer of dockerbuilder, the official build environment for docker binary releases 2013-06-06 19:06:54 +02:00
Solomon Hykes 0d6db333d6 docker-build contrib script is deprecated by the new 'build' command 2013-06-06 19:05:21 +02:00
Solomon Hykes 3999465c85 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-06-06 19:04:17 +02:00
Daniel Mizyrycki 1cc4049e82 Merge pull request #827 from dotcloud/dev_environment_update
Update "Setting Up a Dev Environment" doc, with modern golang  PPA and stable lxc kernel
2013-06-06 09:48:19 -07:00
Victor Vieux 4107701062 add [] and move errors to stderr 2013-06-06 15:45:08 +00:00
Victor Vieux a799cdad3e allow multiple params in inspect 2013-06-06 15:22:54 +00:00
Victor Vieux a118ad90ed changed to 12.04 and add kernel 2013-06-06 12:36:28 +00:00
Thatcher Peskens 0f23fb949d Fixed some links
* Added Google group to FAQ on docs
* Changed IRC link
* Fixed link to contributing broken by 326faec
2013-06-05 18:06:51 -07:00
Thatcher f1992eeea5 Merge pull request #817 from dhrp/blog-in-navigation
Modified the navigation in both website and documentaion to include the blog.
2013-06-05 17:28:19 -07:00
Guillaume J. Charmes 84d68007cb Add -dns to docker daemon 2013-06-05 14:20:54 -07:00
Victor Vieux bf63cb9045 bump to master again 2013-06-05 16:01:36 +00:00
Victor Vieux ce0041832c bump to master 2013-06-05 15:30:45 +00:00
Solomon Hykes 97d5f525f4 hack/PRINCIPLES.md: a list of principles guiding Docker's design. The goal is to scale the decision-making in the project and remove @shykes as a bottleneck as much as possible 2013-06-05 17:27:53 +02:00
Solomon Hykes 2ea29ce0ef hack/ROADMAP.md: a high-level roadmap. Make a pull request to suggest changes 2013-06-05 17:26:26 +02:00
Solomon Hykes 068076f775 Merge pull request #822 from lopter/master
* Client: Print the container id before the hijack in `docker run` (see also #804)
2013-06-05 08:08:30 -07:00
Solomon Hykes 34c8b24211 Merge pull request #812 from dotcloud/809-progress_message-fix
* Remote API: Fix progress message in client
2013-06-05 07:27:31 -07:00
Victor Vieux e3cc625315 update doc to newer go 2013-06-05 13:19:49 +00:00
Victor Vieux f67ea78cce move xino stuff to /dev/shm 2013-06-05 12:59:05 +00:00
Victor Vieux 6255112926 updated doc 2013-06-05 13:19:57 +02:00
Victor Vieux c906239220 bump to master 2013-06-05 10:23:45 +00:00
Victor Vieux b4682e6707 bump to master 2013-06-05 10:19:51 +00:00
Solomon Hykes 04050c4173 Merge pull request #818 from johncosta/ubuntu-1304-add-apt-repository
Remove provider specifc language
2013-06-05 02:40:09 -07:00
Louis Opter 7e6ede6379 Print the container id before the hijack in docker run (see also #804)
This is useful when you want to get the container id before you start to
interact with stdin (which is what I'm doing in dotcloud/sandbox).
2013-06-04 15:32:59 -07:00
Guillaume J. Charmes 63e80384ea Fix nil pointer on some situatuion 2013-06-04 14:35:32 -07:00
Guillaume J. Charmes 7ef9833dbb Put back panic for go1.0.3 compatibility 2013-06-04 14:26:40 -07:00
Guillaume J. Charmes c1ee9bf881 Merge pull request #808 from dotcloud/795-lintify
Cleanup source
2013-06-04 14:20:38 -07:00
John Costa c000ef194c Remove provider specifc language 2013-06-04 16:01:38 -04:00
Ken Cochrane 479ac9afa7 Merge pull request #802 from johncosta/ubuntu-1304-add-apt-repository
- Documentation: adding missing dependency to the ubuntu linux install page.
2013-06-04 11:55:34 -07:00
Thatcher Peskens 716892b95d Modified the navigation in both website and documentaion to include the Blog. 2013-06-04 11:41:54 -07:00
Thatcher d7a6485dfe Merge pull request #796 from dhrp/added-and-fixed-links
Added and fixed some links (closes #502)
2013-06-04 11:28:40 -07:00
Victor Vieux fd224ee590 linted names 2013-06-04 18:00:22 +00:00
Victor Vieux 3922691fb9 fix progress message in client 2013-06-04 16:09:08 +00:00
Sam Alba c566c8efc7 Merge pull request #810 from dotcloud/proxy-fix
fix regression on proxy
2013-06-04 08:46:40 -07:00
Victor Vieux 06b585ce8a fix proxy 2013-06-04 15:44:27 +00:00
John Costa e61af8bc62 some installations of ubuntu 13.04 (digital ocean Ubuntu 13.04 x64 Server in this case) require software-properties-common to be installed before being able to use add-apt-repository 2013-06-04 10:40:44 -04:00
Victor Vieux b6825f98c0 bump to master 2013-06-04 14:00:18 +00:00
Victor Vieux 86ada2fa5d drop/omit 2013-06-04 13:51:12 +00:00
Victor Vieux b515a5a9ec go vet 2013-06-04 13:24:58 +00:00
Michael Crosby 6d5bdff394 Add flag to enable cross domain requests in Api
Add the -api-enable-cors flag when running docker
in daemon mode to allow CORS requests to be made to
the Remote Api.  The default value is false for this
flag to not allow cross origin request to be made.

Also added a handler for OPTIONS requests the standard
for cross domain requests is to initially make an
OPTIONS request to the api.
2013-06-03 21:39:00 -04:00
Guillaume J. Charmes 0ca8844398 Fix stale command with stdout is not allocated 2013-06-03 17:39:29 -07:00
Sam Alba 10ef4f7f39 Merge pull request #797 from dotcloud/registry-fix-missing-body-close
registry.go: Fixed missing Body.Close()
2013-06-03 14:43:50 -07:00
Sam Alba cff3b37a61 Disabled HTTP keep-alive in the default HTTP client for Registry calls 2013-06-03 14:42:21 -07:00
Victor Vieux d26a3b37a6 allow docker run <name>:<id> 2013-06-03 20:00:15 +00:00
Guillaume J. Charmes 82dd963e08 Minor changes in registry.go 2013-06-03 12:20:52 -07:00
Sam Alba 830c458fe7 Fixed missing Body.Close when doing some HTTP requests. It should improve some request issues. 2013-06-03 12:14:57 -07:00
Thatcher Peskens 38f29f7d0c Changed some text on the website to include docker-club
Fixed a link in the FAQ on the docs
Fixed a detail in the Makefile for pushing the site to dotcloud
2013-06-03 11:45:19 -07:00
Solomon Hykes a8ae398bf5 Bumped version to 0.4.0 2013-06-03 10:59:48 -07:00
Victor Vieux 7e59b83053 removed auth in pull 2013-06-03 17:51:52 +00:00
Guillaume J. Charmes 7a4408f608 Merge pull request #794 from dotcloud/780-diff-fix2
- Runtime: remove TrimLeft as it's go1.1
2013-06-03 10:41:08 -07:00
Victor Vieux 854039b6ba remove TrimLeft as it's go1.1 2013-06-03 17:25:51 +00:00
Guillaume J. Charmes 070923b14f Merge pull request #792 from dotcloud/780-diff-fix
- Runtime: fix Path corruption in 'docker diff'
2013-06-03 10:06:25 -07:00
Victor Vieux 71b1657e8d added test 2013-06-03 17:02:57 +00:00
Guillaume J. Charmes 1bafe9da26 Merge pull request #793 from dotcloud/774-remove_login_check_on_pull-fix
- Registry: remove login check on pull
2013-06-03 09:37:02 -07:00
Victor Vieux 1ce4ba6c9f remove check on login 2013-06-03 15:33:29 +00:00
Victor Vieux a55a0d370d ([a-z0-9_]{4,30})/([a-zA-Z0-9-_.]+) 2013-06-03 14:23:57 +00:00
Guillaume J. Charmes 2b1b3c1270 Merge pull request #784 from dotcloud/remove_cgo_dependency
* Runtime: Remove cgo dependency
2013-06-03 07:03:17 -07:00
Guillaume J. Charmes 8243f2510e Update test to reflect new ApiInfo struct 2013-06-03 06:44:00 -07:00
Guillaume J. Charmes 0443cc351d Merge pull request #772 from dotcloud/improve_version_info_cmds
* API: Improve version info cmds
2013-06-03 06:36:09 -07:00
Victor Vieux ca902b6be4 bump master 2013-06-03 12:37:51 +00:00
Victor Vieux 844a8db6c6 add debug 2013-06-03 12:21:22 +00:00
Victor Vieux 3dd1e4d58c added docs and moved to api version 1.2 2013-06-03 12:09:16 +00:00
Victor Vieux 62c78696cd bump to master 2013-06-03 11:06:13 +00:00
Victor Vieux e16c93486d fix Path corruption in 'docker diff' 2013-06-03 10:19:20 +00:00
Solomon Hykes e42eb7fa8c Meta: added Guillaume as primary maintainer for tty code 2013-06-02 23:42:18 -07:00
Solomon Hykes cebfde9ea5 Merge pull request #787 from gasi/nodejs-centos-docs
* Documentation: Deploying a Node.js Web App on CentOS
* Documentation: small formatting improvements
2013-06-02 23:27:29 -07:00
Solomon Hykes eff7a15bea Merge pull request #785 from jweede/master
* Documentation: spelling correction in website
2013-06-02 23:14:09 -07:00
Daniel Gasienica 82dadc2005 Document installation of npm dependencies /ht @grigio 2013-06-02 20:10:22 -07:00
Guillaume J. Charmes 2d52d4d614 Merge pull request #789 from samjsharpe/fix-extra-brace
Removes a brace in the description of the wait command
2013-06-02 15:22:11 -07:00
Sam J Sharpe ca5ae266b7 Removes a brace in the description of the wait command 2013-06-02 22:40:56 +01:00
Daniel Gasienica 464765b940 Add link at the beginning 2013-06-01 22:16:26 -07:00
Daniel Gasienica e9ffc1e499 Add Node.js web app example using CentOS 2013-06-01 22:06:53 -07:00
Daniel Gasienica 4fb9a6eafb Use code blocks 2013-06-01 22:03:41 -07:00
Daniel Gasienica 157547845a Name examples consistently 2013-06-01 22:03:28 -07:00
Daniel Gasienica 2935ca7ee2 Use title case for consistency 2013-06-01 22:03:12 -07:00
Daniel Gasienica 23452f1573 Use em dash in title 2013-06-01 22:02:24 -07:00
Daniel Gasienica f6f345b1fe Fix typo 2013-06-01 21:55:01 -07:00
Daniel Gasienica e3fd61ad74 Add more tags 2013-06-01 21:27:27 -07:00
Daniel Gasienica 01ce63aacd Make style consistent 2013-06-01 21:26:58 -07:00
Daniel Gasienica 3ca9c11110 Add Mac OS X instructions for doc tools 2013-06-01 21:26:18 -07:00
Daniel Gasienica b4df0b17af Add make server command to preview docs 2013-06-01 21:25:51 -07:00
Jon Wedaman 7f65bf508e Spelling correction in docs 2013-06-01 21:48:32 -04:00
Guillaume J. Charmes a70dd65964 Move Termios struct to os specific file 2013-06-01 16:19:50 -07:00
Guillaume J. Charmes 3cc0963ad1 Remove unused constants 2013-06-01 15:55:52 -07:00
Guillaume J. Charmes 31eb01ae8a Use uintptr instead of int for Fd 2013-06-01 15:55:05 -07:00
Guillaume J. Charmes 64f346779f Remove cgo from term 2013-06-01 15:51:45 -07:00
Guillaume J. Charmes 078a19d725 Merge pull request #777 from dotcloud/bsdtar-env
Pass a guaranteed environment to bsdtar for predictable behaviour
2013-06-01 11:28:55 -07:00
Solomon Hykes 561ceac55d * Runtime: pass a guaranteed environment to bsdtar for predictable behavior without depending on the underlying host configuration. 2013-05-31 22:25:48 -07:00
Guillaume J. Charmes a373c770b6 Merge pull request #707 from unclejack/411-add-arch-field
411 add architecture field
2013-05-31 17:26:11 -07:00
Solomon Hykes 90b8c5ce67 Merge pull request #762 from dotcloud/761-packaging-dockerbuilder
Packaging: Ensure dockerbuilder can build docker PPA
2013-05-31 16:28:44 -07:00
Guillaume J. Charmes 9bc71c101c Merge pull request #719 from dotcloud/json_stream-feature
* API: push, pull, import, insert -> Json Stream
2013-05-31 16:05:15 -07:00
Guillaume J. Charmes f41d2ec4d9 Update api docs 2013-05-31 15:56:30 -07:00
Guillaume J. Charmes 1dae7a25b9 Improve the docker version and docker info commands 2013-05-31 15:53:57 -07:00
Daniel Mizyrycki 926c1d45aa Merge pull request #533 from tianon/mkimage-debian
Update mkimage-debian.sh now that wheezy is officially the stable release
MD: Ref issue #447
2013-05-31 14:53:37 -07:00
Guillaume J. Charmes 80b8756da3 Merge pull request #727 from dotcloud/remove_hijack_logs-feature
* API: remove hijack on the client in logs, and split stdout / stderr
2013-05-31 14:43:59 -07:00
Guillaume J. Charmes 7d167590bc Merge pull request #766 from dotcloud/prevent_attach_stopped_container-feature
returns an error if the container we want to attach is not running
2013-05-31 14:41:57 -07:00
Solomon Hykes 76bb920449 Merge pull request #753 from dotcloud/registry_api_remove_teams
Remove teams from the registry API
2013-05-31 12:41:12 -07:00
Solomon Hykes 1ac36a3adf Merge pull request #767 from gasi/master
Fix minor documentation error in ‘Running Redis Service’ example
2013-05-31 12:24:25 -07:00
Solomon Hykes 46bdbbabba Merge pull request #755 from dotcloud/infrastructure2
+ Meta: organize the project infrastructure: servers, dns, email etc.
2013-05-31 12:23:55 -07:00
Daniel Gasienica 766a2db0d9 Add Daniel Gasienica to AUTHORS 2013-05-31 12:19:57 -07:00
Daniel Gasienica fd0c501e6d Fix minor documentation error in ‘Running Redis Service’ example 2013-05-31 12:19:49 -07:00
Victor Vieux 468e4c4b56 returns an error if the container we want to attach is not running 2013-05-31 15:34:23 +00:00
Guillaume J. Charmes 9eda9154a7 Merge pull request #764 from dotcloud/add_t_parameter_doc_build-fix
add missing -t parameter in the doc
2013-05-31 07:49:29 -07:00
Victor Vieux 2baea24879 add -t parameter in the doc 2013-05-31 14:40:09 +00:00
Victor Vieux 9060b5c2f5 added proper returns type, move the auto-prune in v1.1 api 2013-05-31 14:37:02 +00:00
Daniel Mizyrycki 1040225e36 Packaging: Ensure dockerbuilder can build docker PPA 2013-05-31 00:59:18 -07:00
Andy Rothfusz 1c091657d4 Merge pull request #745 from rogaha/doc_ssh_service_example_uptd
Add screencast summary. Makes it easy to reproduce steps.
2013-05-30 18:49:32 -07:00
Solomon Hykes 8d73740343 Bumped version to 0.3.4 2013-05-30 17:27:45 -07:00
Solomon Hykes a148301a03 + Runtime: 'docker build' builds a container, layer by layer, from a source repository containing a Dockerfile
+ Runtime: 'docker build -t FOO' applies the tag FOO to the newly built container.
2013-05-30 16:49:40 -07:00
Victor Vieux 3afdd82e42 bump to master 2013-05-30 23:38:40 +00:00
Victor Vieux bd38b47552 bump to master 2013-05-30 23:32:57 +00:00
Solomon Hykes caaea2e08f * Build: never remove temporary images and containers 2013-05-30 16:24:26 -07:00
Solomon Hykes de7ce7c10d Merge pull request #752 from dotcloud/victor_maintainer
* Meta: make Victor Vieux a core maintainer
2013-05-30 16:19:18 -07:00
Victor Vieux 5aa95b667c WIP needs to fix HTTP error codes 2013-05-30 22:53:45 +00:00
Solomon Hykes c903a6baf8 * Builder: keep temporary images after a build fails, to allow caching 2013-05-30 15:52:09 -07:00
Solomon Hykes 4205b6bb1d Merge branch 'master' into builder_server-2 2013-05-30 14:09:42 -07:00
Guillaume J. Charmes ca6409059d Merge pull request #749 from dotcloud/unit_tests_use_available_port-fix
- Test: if `address already in use` in unit tests, try a different port
2013-05-30 13:11:44 -07:00
Guillaume J. Charmes 459a2867dd Merge pull request #741 from dotcloud/split_stdout_stderr_run-feature
* API: Split stdout stderr in docker run if no -t
2013-05-30 12:38:11 -07:00
Guillaume J. Charmes 28d5b2c15a Update docker build docs 2013-05-30 12:35:19 -07:00
Guillaume J. Charmes 054451fd19 NON-WORKING: Beginning of rmi refactor 2013-05-30 12:30:21 -07:00
Solomon Hykes 43f369ea0c Organize the project infrastructure: servers, dns, email etc. 2013-05-30 12:28:24 -07:00
Guillaume J. Charmes 6d2e3d2ec0 Fix issue with CMD instruction within docker build 2013-05-30 12:21:57 -07:00
Guillaume J. Charmes a4e6025cc1 Deprecate INSERT and COPY 2013-05-30 12:10:54 -07:00
Guillaume J. Charmes 56431d3130 Add -t to docker build in order to tag resulting image 2013-05-30 12:08:21 -07:00
Solomon Hykes 5324614410 Merge pull request #747 from riccieri/patch-1
+ * Documentation: add IP forwarding config to archlinux guide
2013-05-30 11:59:53 -07:00
Solomon Hykes 531b30119a Remove special case for 'teams' from registry api 2013-05-30 11:37:58 -07:00
Solomon Hykes fc788956c5 Make Victor Vieux a core maintainer 2013-05-30 11:31:49 -07:00
Solomon Hykes 2ed1092dad * Documentation: removed 'building blocks' for now. 2013-05-30 11:26:47 -07:00
Victor Vieux cd002a4d16 ensure progress downloader is well formated 2013-05-30 17:00:42 +00:00
Victor Vieux 49e656839f move auth to the client WIP 2013-05-30 15:39:43 +00:00
Guillaume J. Charmes 194fca8347 Merge pull request #750 from dotcloud/ensure_order_help-fix
Always display help in the same order
2013-05-30 07:40:59 -07:00
Victor Vieux 2c14d3949d always display help in the same order 2013-05-30 14:08:26 +00:00
Victor Vieux 2a53717e8f if address already in use in unit tests, try a different port 2013-05-30 13:45:39 +00:00
Solomon Hykes 97247c5c73 'docker build': remove INSERT command (should add support for remote sources in ADD instead) 2013-05-29 21:57:36 -07:00
Renato Riccieri Santos Zannon b2084a9c59 Add IP forwarding config to archlinux guide
I had this small issue when following this guide on my Arch box, and I don't think it is specific to any configuration I have.
2013-05-30 01:56:08 -03:00
Guillaume J. Charmes 9a39404127 Fix issue with mkdir within docker build 2013-05-29 18:55:00 -07:00
Solomon Hykes fc864d2f0f Simplified syntax of 'docker build': 'docker build PATH | -' 2013-05-29 18:18:57 -07:00
Solomon Hykes dcab408f6a Fixed phrasing, typos and formatting in 'docker build' 2013-05-29 18:14:50 -07:00
Guillaume J. Charmes faafbf2118 Fix ADD behavior on single files 2013-05-29 17:58:05 -07:00
Guillaume J. Charmes 881fdc59ed Remove cache opti that cause wrong cache miss 2013-05-29 17:04:46 -07:00
Guillaume J. Charmes 560a74af15 Fix cache miss issue within docker build 2013-05-29 16:11:04 -07:00
Guillaume J. Charmes b6165daa77 Create a layer for each operation (expose, cmd, etc) 2013-05-29 15:03:00 -07:00
Guillaume J. Charmes ae0d555022 Fix autorun issue within docker build 2013-05-29 14:37:03 -07:00
Solomon Hykes 7ff2e6b797 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-29 12:31:11 -07:00
Guillaume J. Charmes 92939569ab Update build doc 2013-05-29 11:53:44 -07:00
Guillaume J. Charmes d97fff60a9 Update docker build docs 2013-05-29 11:50:49 -07:00
Guillaume J. Charmes 33ea1483d5 Allow docker build from stdin 2013-05-29 11:43:29 -07:00
Roberto Gandolfo Hashioka c7af917d13 updated the running ssh service example with the video's transcription 2013-05-29 11:29:30 -07:00
Guillaume J. Charmes c05e9f856d Error output fix for docker rmi 2013-05-29 11:11:19 -07:00
Guillaume J. Charmes 6cbc7757b2 Fix issue with unknown instruction within docker build 2013-05-29 10:53:24 -07:00
Guillaume J. Charmes 75d2244023 Update docker build UI 2013-05-29 10:51:47 -07:00
Victor Vieux 7e92302c4f auto prune WIP 2013-05-29 17:27:32 +00:00
Victor Vieux 94f0d478de refacto 2013-05-29 17:01:54 +00:00
Victor Vieux 2eb4e2a0b8 removed the -f 2013-05-29 16:31:47 +00:00
Guillaume J. Charmes 08e5f12954 Merge pull request #739 from dotcloud/push_issue-1
- Registry: Cereate a new registry object for each request (~session)
2013-05-29 09:22:12 -07:00
Victor Vieux e33ba9b36d split stdout and stderr in run if not -t 2013-05-29 14:14:51 +00:00
Victor Vieux a5fe6f8af4 Merge branch 'master' into split_stdout_stderr_run-feature 2013-05-29 13:56:27 +00:00
Victor Vieux f339fc2eb9 bump to master 2013-05-29 13:52:18 +00:00
Victor Vieux 8f829eb5e4 Merge pull request #740 from dotcloud/ps_output-fix
fix ps output
2013-05-29 06:43:03 -07:00
Victor Vieux 044bdc1b5f fix ps output 2013-05-29 13:42:20 +00:00
Victor Vieux ea9095c562 merge master 2013-05-29 11:49:39 +00:00
Victor Vieux c00d1a6ebe improve attach 2013-05-29 11:40:54 +00:00
Solomon Hykes 11550c6063 Removed debug output in 'docker version' 2013-05-28 21:38:35 -07:00
Solomon Hykes dc1fa0745f Improved wording of a maintainer's responsibilities 2013-05-28 22:33:48 -06:00
Solomon Hykes 3bac27f240 Fixed formatting of CONTRIBUTING.md 2013-05-28 22:26:42 -06:00
Solomon Hykes 286ce266b4 allmaintainers.sh: print a flat list of all maintainers of a directory (including sub-directories) 2013-05-28 20:55:07 -07:00
Solomon Hykes aa42c6f2a2 Added Victor and Daniel as maintainers for api.go and Vagrantfile, respectively 2013-05-28 20:45:12 -07:00
Solomon Hykes 7181edf4b2 getmaintainer.sh: parse MAINTAINERS file to determine who should review changes to a particular file or directory 2013-05-28 20:44:41 -07:00
Solomon Hykes c7985808ae + Runtime: stable implementation of 'docker build' 2013-05-28 19:40:38 -07:00
Solomon Hykes 83db1f36e3 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-28 19:39:20 -07:00
Solomon Hykes 24ddfe3f25 Documented who decides what and how. 2013-05-28 19:39:09 -07:00
Guillaume J. Charmes b76d6120ac Update tests with new cookies for registry 2013-05-28 17:35:10 -07:00
Guillaume J. Charmes cd0de83917 Cereate a new registry object for each request (~session) 2013-05-28 17:12:24 -07:00
Guillaume J. Charmes e84306ca61 Merge pull request #730 from dotcloud/invert_status_created-fix
- Runtime: invert status created in docker ps
2013-05-28 15:45:52 -07:00
Guillaume J. Charmes f65327555e Merge pull request #731 from dotcloud/change_containersPs_containersJson_api-feature
* API: rename containers/ps to containers/json
2013-05-28 15:44:20 -07:00
Guillaume J. Charmes 7aa0d11171 Merge pull request #732 from dotcloud/718-return_no_such_container_as_404-fix
- API: return 404 on no such containers in /attach
2013-05-28 15:43:07 -07:00
Guillaume J. Charmes 54af053623 Make sure the last line of docker build is the image id 2013-05-28 15:40:22 -07:00
Guillaume J. Charmes 5b33b2463a Readd build tests 2013-05-28 15:31:06 -07:00
Guillaume J. Charmes 2127f8d6ad Fill the multipart writer directly instead of using reader 2013-05-28 15:22:34 -07:00
Guillaume J. Charmes 2897cb0476 Add directory contents instead of while directory for docker build 2013-05-28 15:22:01 -07:00
Guillaume J. Charmes fe0c0c208c Send error without headers when using chunks 2013-05-28 15:21:06 -07:00
Solomon Hykes 522f399d68 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-28 14:57:50 -07:00
Solomon Hykes 326faec664 De-duplicated contribution instructions. The authoritative instructions are in CONTRIBUTING.md at the root of the repo. 2013-05-28 14:57:36 -07:00
Thatcher 28a30eda88 Merge pull request #702 from kim0/patch-2
Properly install ppa, avoid GPG key warning. Also closes #715
2013-05-28 14:17:59 -07:00
Solomon Hykes 387eb5295a Removed deprecated SPECS directory 2013-05-28 14:13:20 -07:00
Thatcher f3cc1d985e Merge pull request #733 from meejah/master
Documentation: Use add-apt-repository instead of editing sources.list
2013-05-28 13:55:11 -07:00
Guillaume J. Charmes cfb8cbe521 Small fix 2013-05-28 13:51:21 -07:00
Guillaume J. Charmes 582a9e0a67 Make docker build flush output each line 2013-05-28 13:47:04 -07:00
Guillaume J. Charmes a48799016a Fix merge issue 2013-05-28 13:46:52 -07:00
Guillaume J. Charmes dce82bc856 Merge master 2013-05-28 13:42:50 -07:00
Guillaume J. Charmes 90ffcda055 Update the UI for docker build 2013-05-28 13:38:40 -07:00
Guillaume J. Charmes 6ae3800151 Implement the CmdAdd instruction 2013-05-28 13:38:26 -07:00
Guillaume J. Charmes 54db18625a Add Extension() method to Compresison type 2013-05-28 13:37:49 -07:00
Andy Rothfusz 235ae9cd43 Merge pull request #709 from dhrp/links-to-kernel-doc
Added links to @jpetazzo 's kernel article, cleaned puppet doc layout
2013-05-28 12:07:46 -07:00
meejah 444f7020cb Add sudo to commands. 2013-05-28 10:56:26 -06:00
meejah 525080100d Use Ubuntu's built-in method to add a PPA repository, which correctly handles keys for you. 2013-05-28 10:54:32 -06:00
Victor Vieux e5fa4a4956 return 404 on no such containers in /attach 2013-05-28 16:19:12 +00:00
Victor Vieux 4f9443927e rename containers/ps to containers/json 2013-05-28 16:08:05 +00:00
Victor Vieux 8699805756 documentation 2013-05-28 15:49:57 +00:00
Victor Vieux d9670f4275 invert status created 2013-05-28 15:06:26 +00:00
Ken Cochrane 3d8da80611 Merge pull request #729 from mmcgrana/fix-attach-api-docs
- Documentation: Fix attach API docs typo.
2013-05-28 06:53:41 -07:00
Mark McGranaghan 7d6ff7be12 Fix attach API docs. 2013-05-28 06:27:12 -07:00
Victor Vieux fbcd8503b3 remove hijack on the client in logs, and split stdout / stderr 2013-05-27 16:07:05 +00:00
Victor Vieux 5a36efb61f fix json encoding, and use less casts 2013-05-26 23:45:45 +00:00
Victor Vieux 14212930e4 ensure valid json 2013-05-25 15:51:26 +00:00
Victor Vieux c8c7094b2e imporved error, push, import insert 2013-05-25 15:09:46 +00:00
Victor Vieux cb0bc4adc2 add error handling 2013-05-25 14:12:02 +00:00
unclejack 5f69a53dba set architecture to x86_64 by default
We're going to hardcode architecture to amd64 for now.
This is a stub and will have to be changed to set the actual arch.
2013-05-25 13:03:49 +03:00
Guillaume J. Charmes d3b9733507 Merge pull request #657 from offby1/master
Minor tweaks to python_web_app.rst
2013-05-24 19:19:32 -07:00
Solomon Hykes df23a1e675 * Registry: specified naming restrictions for usernames and repository names 2013-05-24 18:58:24 -07:00
Solomon Hykes bb4b35a892 Fix a unit test broken by pull request #703 2013-05-24 18:32:21 -07:00
Solomon Hykes 194f487749 Added FIXME about possible race condition in a unit test 2013-05-24 18:31:47 -07:00
Solomon Hykes 9775f0bd14 * Remote API: send push/pull progress bar as json 2013-05-24 17:59:27 -07:00
Guillaume J. Charmes a05bfb246f Merge pull request #710 from dotcloud/tty_resize
+ Tty: Handle terminal size and resize in tty mode
2013-05-24 15:12:22 -07:00
Guillaume J. Charmes b438565609 Fix merge issue 2013-05-24 14:48:13 -07:00
Guillaume J. Charmes ffd9e06deb Merge branch 'master' into tty_resize
Conflicts:
	commands.go
2013-05-24 14:45:31 -07:00
Guillaume J. Charmes 88ef309a94 Finish resize implementation client and server 2013-05-24 14:44:16 -07:00
Thatcher Peskens c5f15dcd3d Added links to @jpetazzo 's kernel article, removed quote indents from puppet.rst 2013-05-24 14:42:00 -07:00
Guillaume J. Charmes d8e60b797f Merge pull request #630 from dotcloud/check_if_logged_before_pull-fix
add login check before pull user's repo
2013-05-24 12:29:59 -07:00
Guillaume J. Charmes 064101d82e Merge pull request #689 from dotcloud/help_command-fix
- Runtime: bring Error: Command not found: <command>
2013-05-24 12:01:19 -07:00
Guillaume J. Charmes a3293ed854 Fix merge issue 2013-05-24 11:56:21 -07:00
Guillaume J. Charmes 3d1bc2660c Merge branch 'master' into help_command-fix
Conflicts:
	commands.go
2013-05-24 11:46:18 -07:00
unclejack 2cf92abf0e add arch field to image struct 2013-05-24 21:41:30 +03:00
Guillaume J. Charmes 48fd8ae79c Merge branch '573-add_host_port-feature' 2013-05-24 11:36:05 -07:00
Guillaume J. Charmes c167d603f2 Merge pull request #661 from dotcloud/573-add_host_port-feature
+ Runtime: add -H flag to listen/connect to different ip/port
2013-05-24 11:32:57 -07:00
Guillaume J. Charmes bfb65b733a Simplify the Host flag parsing 2013-05-24 11:31:36 -07:00
Guillaume J. Charmes ae72c2f4d6 Gofmt 2013-05-24 11:31:19 -07:00
Guillaume J. Charmes 0146f65a44 Fix issue within auth test 2013-05-24 11:31:11 -07:00
Guillaume J. Charmes deb9963e6e Catch sigwinch client 2013-05-24 11:07:32 -07:00
Victor Vieux d7b01c049d bump to master 2013-05-24 16:50:16 +00:00
Victor Vieux 92e4a51965 use -H 2013-05-24 16:49:18 +00:00
Victor Vieux 3c7bca7a21 first version of Pull 2013-05-24 16:34:03 +00:00
Ken Cochrane 1b5ab5afe0 Merge pull request #701 from kim0/patch-1
- Documentation: Updated ubuntu install docs to avoid hardcoding kernel 3.8 version, and allow Ubuntu updates to work
2013-05-24 08:58:02 -07:00
kim0 4e576f047f Properly install ppa, avoid GPG key warning 2013-05-24 18:55:32 +03:00
kim0 8dc2ad2c06 Avoid hardcoding kernel 3.8 version, allow Ubuntu updates to work 2013-05-24 17:44:02 +02:00
Victor Vieux 58ce66e553 Merge pull request #699 from dotcloud/docker_login-fix
fix docker login when same username
2013-05-24 07:32:38 -07:00
Victor Vieux 1f23b4caae fix docker login when same username 2013-05-24 14:23:43 +00:00
Victor Vieux 1c946ef003 fix: Can't lookup root of unregistered image 2013-05-24 13:03:09 +00:00
Victor Vieux 4dab2fccd3 removed useless params 2013-05-24 12:43:24 +00:00
Victor Vieux a7d7a06655 change %f to %g 2013-05-24 12:23:28 +00:00
Victor Vieux 9ebfcc9a15 bump to master 2013-05-24 12:17:44 +00:00
Guillaume J. Charmes 70d2123efd Add resize endpoint to api 2013-05-23 19:33:28 -07:00
Guillaume J. Charmes 2cd00a47a5 remove unused function 2013-05-23 18:34:38 -07:00
Guillaume J. Charmes e3f0429859 Add missing buildfile.go 2013-05-23 18:33:31 -07:00
Guillaume J. Charmes d42c10aa09 Implement Context within docker build (not yet in use) 2013-05-23 18:32:56 -07:00
Guillaume J. Charmes ecb64be6a8 Merge pull request #695 from dtzWill/694-fix-merge-config
- Runtime: utils.go: Fix merge logic for user and hostname.
2013-05-23 16:00:34 -07:00
Will Dietz 83bc5b7435 utils.go: Fix merge logic for user and hostname.
Fall back to image-specified hostname if user doesn't
provide one, instead of only using image-specified
hostname if the user *does* try to set one.
(ditto for username)

Closes #694.
2013-05-23 15:54:51 -05:00
Guillaume J. Charmes 822056094a Bumped version to 0.3.3 2013-05-23 12:46:14 -07:00
Daniel Mizyrycki d17c0b8368 Packaging: Update changelog for release 0.3.3 2013-05-23 12:45:00 -07:00
Solomon Hykes e0e385ac69 * Build: leave temporary containers untouched after a failure to help debugging 2013-05-23 11:12:54 -06:00
Solomon Hykes 66f3a96983 * Remote API: add versioning 2013-05-23 10:44:36 -06:00
Victor Vieux 31c98bdaaf bring Error: Command not found: <command>
Usage: docker COMMAND [arg...]

A self-sufficient runtime for linux containers.

Commands:
    attach    Attach to a running container
    insert    Insert a file in an image
    login     Register or Login to the docker registry server
    export    Stream the contents of a container as a tar archive
    diff      Inspect changes on a container's filesystem
    logs      Fetch the logs of a container
    pull      Pull an image or a repository from the docker registry server
    restart   Restart a running container
    build     Build a container from Dockerfile or via stdin
    history   Show the history of an image
    kill      Kill a running container
    rmi       Remove an image
    start     Start a stopped container
    tag       Tag an image into a repository
    commit    Create a new image from a container's changes
    import    Create a new filesystem image from the contents of a tarball
    ps        List containers
    rm        Remove a container
    run       Run a command in a new container
    wait      Block until a container stops, then print its exit code
    images    List images
    port      Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
    info      Display system-wide information
    inspect   Return low-level information on a container
    push      Push an image or a repository to the docker registry server
    search    Search for an image in the docker index
    stop      Stop a running container
    version   Show the docker version information back
2013-05-23 16:32:39 +00:00
Victor Vieux 59835135c5 added warning 2013-05-23 16:15:36 +00:00
Victor Vieux 13f1939a63 switch to default 127.0.0.1, and mixed the two flags in one. -h 2013-05-23 16:09:28 +00:00
Solomon Hykes dbb7b60cfc Re-ordered and re-titled kernel requirement details to match the shortlist 2013-05-23 09:49:53 -06:00
Solomon Hykes e77263010c Simplified and clarified kernel install instructions 2013-05-23 09:47:20 -06:00
Solomon Hykes 2cf29893b3 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-23 09:33:34 -06:00
Solomon Hykes 5f30453bfe Merge pull request #688 from pxlpnk/patch-1
Fixing two typos in the run help
2013-05-23 08:21:05 -07:00
Victor Vieux cf35e8ed81 jsonstream WIP 2013-05-23 15:16:35 +00:00
Andreas Tiefenthaler 9e0427081e Fixing two typos in the run help 2013-05-23 18:09:59 +03:00
Solomon Hykes bc3675d471 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-23 09:01:40 -06:00
Victor Vieux b45143da9b switch to SI standard and add test 2013-05-23 10:29:09 +00:00
Victor Vieux ed56b6a905 fix typo 2013-05-23 09:35:20 +00:00
Guillaume J. Charmes 0f135ad7f3 Start moving the docker builder into the server 2013-05-22 20:07:26 -07:00
Thatcher 422edd513a Merge pull request #683 from rogaha/doc_meta_info_update
Looks good. Thanks!  Closes #637
2013-05-22 19:09:32 -07:00
rogaha 18cb5c9314 added/modifed tittle, description and keywords
changed the title prefix to sufix + Documentation
2013-05-22 17:52:48 -07:00
Thatcher 4d80924f7c Merge pull request #681 from dhrp/680-fix-readme-image
Fix broken image on README, closes #680
2013-05-22 16:09:21 -07:00
Thatcher Peskens f008d1107c Fix broken image on README, closes #680 2013-05-22 16:04:33 -07:00
Eric Hanchrow 056698b676 Use 127.0.0.1 instead of hostname in the "access the web app" section. 2013-05-22 12:54:50 -07:00
Eric Hanchrow b4198de6bf Merge remote-tracking branch 'upstream/master'
Conflicts:
	docs/sources/examples/python_web_app.rst
2013-05-22 12:52:14 -07:00
Victor Vieux 800b401f0b improved doc and usage 2013-05-22 16:15:52 +00:00
Victor Vieux faae7220c0 api versionning 2013-05-22 15:29:54 +00:00
Ken Cochrane 1ccc7bdd90 Merge pull request #668 from christophercurrie/patch-1
- Documentation: Fix typos in the python web app example docs.
2013-05-22 07:52:46 -07:00
Victor Vieux 52113cc443 Merge pull request #670 from dotcloud/669-wrong_content_type_create-fix
Fix content type in doc
2013-05-22 06:54:39 -07:00
Victor Vieux 949a649cc2 fix content type in doc 2013-05-22 13:49:12 +00:00
Victor Vieux 6fce89e60b bump to master 2013-05-22 13:41:29 +00:00
Christopher Currie 5818813183 Apparent typos in the docs. 2013-05-21 21:45:27 -06:00
Victor Vieux 4489005cb2 add regexp check on repo's name 2013-05-21 12:53:05 +00:00
Victor Vieux a3ccec197e add -host and -port 2013-05-21 10:14:58 +00:00
Guillaume J. Charmes e6e13d6ade Merge pull request #658 from dotcloud/builder_client_doc
Builder client doc
2013-05-20 18:14:44 -07:00
Guillaume J. Charmes 3f22842542 Remove no longer needed tests 2013-05-20 17:54:54 -07:00
Guillaume J. Charmes 218812eb3c Update docker builder doc 2013-05-20 17:52:39 -07:00
Guillaume J. Charmes d37dea318e Merge pull request #653 from dotcloud/builder_client
* Builder: Move the Builder to the client
2013-05-20 17:50:17 -07:00
Guillaume J. Charmes 49505c599b Fix an issue trying to pull specific tag 2013-05-20 17:30:33 -07:00
Guillaume J. Charmes f35f084059 Use pointers for the object methods 2013-05-20 16:35:28 -07:00
Eric Hanchrow 3a9ef5f9bb Install curl; nix stray backslash; use proper IP address 2013-05-20 16:31:39 -07:00
Guillaume J. Charmes 0d2fb29537 Merge fix 2013-05-20 16:21:35 -07:00
Guillaume J. Charmes 13e687e579 Allow multiple syntaxes for CMD 2013-05-20 16:00:51 -07:00
Guillaume J. Charmes b06784b0dd Make docker client an interface 2013-05-20 16:00:16 -07:00
Guillaume J. Charmes d756ae4cb3 Tag all images after pulling them 2013-05-20 15:19:05 -07:00
Guillaume J. Charmes c6bc90d02d Isolate run() from commit 2013-05-20 15:02:32 -07:00
Guillaume J. Charmes b51303cddc Make sure to have a command to execute upon commit 2013-05-20 13:50:50 -07:00
Guillaume J. Charmes c2a14bb196 Add "Cmd" prefix to builder instructions 2013-05-20 12:09:15 -07:00
Victor Vieux 67b20f2c8c add check to see if the image isn't parent of another and add -f to force 2013-05-20 18:31:45 +00:00
Guillaume J. Charmes bebbbf914b Merge pull request #625 from dotcloud/remove-hijack
Remove hijack from api when not necessary
2013-05-20 11:27:07 -07:00
Guillaume J. Charmes 372d81c325 Merge remove-hijack 2013-05-20 11:07:34 -07:00
Guillaume J. Charmes ae9d7a5167 Avoid cast each write for flusher 2013-05-20 10:58:35 -07:00
Guillaume J. Charmes 0bb54813d4 Merge pull request #652 from unclejack/fix-compilation-on-linux
fix compilation on linux
2013-05-20 10:55:17 -07:00
unclejack 1b007828c9 fix compilation on linux 2013-05-20 20:43:09 +03:00
Guillaume J. Charmes 98b0fd173b Make the printflfush an interface 2013-05-20 10:22:50 -07:00
Guillaume J. Charmes 2879ef4642 Merge pull request #639 from fsouza/fix-utils-darwin
utils: fix compilation on Darwin
2013-05-20 10:10:30 -07:00
Ken Cochrane b3101beb47 Merge pull request #645 from fsouza/fix-api-docs
- Documentation: remove trunc_cmd from /containers/ps example no longer needed.
2013-05-20 07:52:22 -07:00
Ken Cochrane 580df1dfc6 Merge pull request #646 from kirang89/master
- Documentation: Fixed typos in README
2013-05-19 16:53:33 -07:00
Guillaume J. Charmes 0f312113d3 Move docker build to client 2013-05-19 10:46:24 -07:00
Kiran Gangadharan 0b785487fe Fixed typos 2013-05-19 21:04:34 +05:30
Francisco Souza 8291f8b85c docs/remote_api: remove trunc_cmd from /containers/ps example
Apparently, this parameter does not exist anymore.
2013-05-19 11:57:45 -03:00
Ken Cochrane 6471fd3825 Merge pull request #644 from philspitler/master
- Documentation: Fixed typo in remote api docs
2013-05-19 06:41:26 -07:00
Phil Spitler ea7fdecd41 Fixed typo in remote API doc 2013-05-19 09:37:02 -03:00
Francisco Souza 2b55874584 utils: fix compilation on Darwin
Although Docker daemon does not work on Darwin, the API client will have
to work. That said, I'm fixing the compilation of the package on Darwin.
2013-05-19 00:02:42 -03:00
Ken Cochrane 66e9f155c3 Merge pull request #632 from jpetazzo/626-kernel-docs
+ Documentation: Added a section for Kernel requirements to the Docker Docs.
2013-05-18 07:53:45 -07:00
Victor Vieux 6102552d61 Merge branch 'master' into 610-improve_rmi-feature 2013-05-18 14:29:37 +00:00
Victor Vieux d7673274d2 check if the image to delete isn't parent of another 2013-05-18 14:29:32 +00:00
Victor Vieux 0143be42a1 add flush after each write when needed 2013-05-18 14:03:53 +00:00
Thatcher Peskens 537cce16f2 Added a "we are hiring" to the frontpage of the docker website, and fixed two broken links in the docs. 2013-05-17 19:35:46 -07:00
Jérôme Petazzoni 6301373c68 Add some details about pre-3.8 kernels 2013-05-17 18:58:00 -07:00
Jérôme Petazzoni 72360b2cdf Add information about kernel requirements
This page will be helpful for people who:
- want run run a custom kernel
- want to enable memory/swap accounting on Debian/Ubuntu
2013-05-17 18:57:56 -07:00
Ken Cochrane 45c5180516 Merge pull request #631 from garethr/puppet_usage_docs
+ Documentation: Added a section on how to use Docker with puppet.
2013-05-17 13:43:17 -07:00
Victor Vieux f01990aad2 fix 2013-05-17 17:57:44 +00:00
Guillaume J. Charmes ffb38ce0ad Merge pull request #633 from dotcloud/fix_insert
Fix insert
2013-05-17 10:16:03 -07:00
Victor Vieux 3703a65405 fixed insert 2013-05-17 17:09:09 +00:00
Gareth Rushgrove 55dd0afb5d add instructions for using docker with puppet 2013-05-17 17:08:37 +01:00
Victor Vieux 1b0b962b43 add login check before pull user's repo 2013-05-17 13:23:12 +00:00
Guillaume J. Charmes 08121c8f6b Update Push to reflect the correct API 2013-05-16 14:33:29 -07:00
Guillaume J. Charmes 6145812444 Update tests to reflect new behavior 2013-05-16 14:33:10 -07:00
Guillaume J. Charmes f498dd2a2b - Registry: Fix issue preventing to pull specific tag 2013-05-16 12:29:16 -07:00
Guillaume J. Charmes f29e5dc8a1 Remove hijack from api when not necessary 2013-05-16 12:09:06 -07:00
Guillaume J. Charmes db1e965b65 Merge fixes + cleanup 2013-05-16 11:27:50 -07:00
Guillaume J. Charmes 2ae8aaa106 Merge branch 'master' into 610-improve_rmi-feature 2013-05-16 11:15:16 -07:00
Guillaume J. Charmes e86fe7e5af Merge pull request #622 from dotcloud/616-support_wider_range_bool-feature
* API: Support wider range of bool parameters in the api: 1 or 0 -> 1/True/true or 0/False/false
2013-05-16 10:37:23 -07:00
Victor Vieux 0c5443571d 1 or 0 -> 1/True/true or 0/False/false 2013-05-16 13:45:29 +00:00
Thatcher 6677c7964a Merge pull request #620 from dhrp/documentation-review
Pulling the installation documentation update. Includes some timely fixes of broken links.
2013-05-15 20:12:09 -07:00
Thatcher Peskens 8454a86e97 Mostly changes to the html, moved pages, fixed links.
* Moved the introduction page to the en/latest/index.html home of the documentation and pointed all links there
* Fixed a broken link from+to homepage
* Fixed the javascript of the documentation navigation to allow expand and collapse multiple times.
* Fixed the one typo Andy pointed out
2013-05-15 20:00:20 -07:00
Guillaume J. Charmes fef816163c Merge pull request #618 from titanous/cleanup
Misc. cleanup
2013-05-15 18:05:31 -07:00
Guillaume J. Charmes f53ec3373d Merge pull request #604 from dotcloud/603-docker-ci
+ Buildbot: testing; issue #603: Create AWS testing buildbot instance for docker CI
2013-05-15 18:05:02 -07:00
Guillaume J. Charmes 0ad34c6cd5 Merge pull request #605 from dotcloud/251-packaging-debian
* Packaging: packaging-debian; issue #251: Update files for prerelease
2013-05-15 18:04:26 -07:00
Guillaume J. Charmes acf1d5bf0e Merge pull request #592 from dotcloud/refactor_commands_object-feature
* Runtime: refactor commands.go into an object, will be easier for tests
2013-05-15 18:03:30 -07:00
Guillaume J. Charmes d8bf5af79b Merge pull request #578 from dotcloud/registry-update-tests
+ Registry: Allow INDEX override
2013-05-15 18:00:13 -07:00
Guillaume J. Charmes 7cd7dcda0b Merge pull request #608 from dotcloud/split_subpackage
* Project: Split the project into sub-packages
2013-05-15 17:59:10 -07:00
Guillaume J. Charmes 1b04ccf62c Disable registry unit tests 2013-05-15 17:57:53 -07:00
Guillaume J. Charmes 10f5b6486c Update utils_test.go 2013-05-15 17:46:01 -07:00
Guillaume J. Charmes 822cf67dae Remove test file 2013-05-15 17:44:37 -07:00
Guillaume J. Charmes f3bab52df4 Move getKernelVersion to utils package 2013-05-15 17:40:47 -07:00
Guillaume J. Charmes 10e19e4b97 Update tests to reflect new AuthConfig 2013-05-15 17:31:11 -07:00
Guillaume J. Charmes 95dd6d31a4 Move authConfig from runtime to registry 2013-05-15 17:17:33 -07:00
Thatcher Peskens b5c1b17b50 Updated getting started on website. 2013-05-15 16:19:18 -07:00
Thatcher Peskens 2ebbd2d636 Clean up of unnecessary files. 2013-05-15 16:13:20 -07:00
Thatcher Peskens ce35f5d899 Updated the entire installation section text, checked everything, cleaned up rackspace installation. 2013-05-15 16:11:59 -07:00
Guillaume J. Charmes bb85ce9aff Allow to change login 2013-05-15 13:39:24 -07:00
Guillaume J. Charmes dc9d6c1c1f Upload images only when necessary 2013-05-15 13:22:57 -07:00
Jonathan Rudenberg aa0d40747c Remove broken, redundant struct tag 2013-05-15 16:02:24 -04:00
Jonathan Rudenberg 3a339b2bb3 Update AUTHORS 2013-05-15 15:57:21 -04:00
Jonathan Rudenberg 52ef89f9c2 Fix mistaken call to fmt.Println 2013-05-15 15:52:19 -04:00
Jonathan Rudenberg 04748a7766 Fix logic flaw in builder.mergeConfig 2013-05-15 15:51:04 -04:00
Guillaume J. Charmes 97880a223e Move httpClient within registry object 2013-05-15 19:22:08 +00:00
Guillaume J. Charmes 2f4de3867d Reenable docker push 2013-05-15 19:21:37 +00:00
Guillaume J. Charmes 398a6317a0 Remove stdout from registry 2013-05-15 18:50:52 +00:00
Guillaume J. Charmes 49b61af1f8 Refactor registry Push 2013-05-15 18:30:40 +00:00
Victor Vieux f27415540f rename client to DockerCli to prepare the split CLI/API 2013-05-15 14:16:46 +00:00
Victor Vieux c80448c4d1 improve rmi 2013-05-15 13:51:50 +00:00
Guillaume J. Charmes 828d1aa507 Begin to implement push with new project structure 2013-05-15 03:27:15 +00:00
Guillaume J. Charmes e7077320ff Update tests to reflect new project structure 2013-05-15 01:52:09 +00:00
Guillaume J. Charmes 9bb3dc9843 Split registry into subpackage 2013-05-15 01:41:39 +00:00
Victor Vieux c75942c79d add 4243 port forward 2013-05-15 02:41:19 +02:00
Guillaume J. Charmes 2e69e1727b Create a subpackage for utils 2013-05-14 22:37:35 +00:00
shin- 539c876727 Make tests less verbose 2013-05-14 22:00:53 +00:00
shin- e6324ff400 Added small doc page for DOCKER_INDEX_URL variable 2013-05-14 22:00:24 +00:00
shin- 17ad00a35e gofmt pass 2013-05-14 22:00:24 +00:00
shin- 6c7dc1de86 Repository name can not exceed 30 characters 2013-05-14 22:00:24 +00:00
shin- 20a57f15b9 Added login/account creation tests 2013-05-14 22:00:24 +00:00
shin- 54871e3683 Added test for PushRepository 2013-05-14 22:00:24 +00:00
shin- 2b620efffd Allow index server address to vary during execution 2013-05-14 22:00:24 +00:00
shin- fc1d1d871b Find docker index URL in ENV before using default value. Unit tests for docker pull 2013-05-14 22:00:24 +00:00
Daniel Mizyrycki 341739d916 packaging-debian; issue #251: Update files for prerelease 2013-05-14 03:28:59 -07:00
Daniel Mizyrycki 085ee6fcc4 testing; issue #603: Create AWS testing buildbot instance for docker CI 2013-05-13 23:10:00 -07:00
Guillaume J. Charmes d586662ce5 Merge pull request #598 from unclejack/build-docker-with-go1.1
* Dockerbuilder - build docker using Go 1.1
2013-05-13 15:20:13 -07:00
unclejack 48fcde8193 build docker using Go 1.1 2013-05-14 01:10:24 +03:00
Guillaume J. Charmes ccc4fae30a Merge pull request #586 from tbikeev/master
* Vagrant: AWS region and ami name can now be set as ENV variables.
2013-05-13 14:06:48 -07:00
Ken Cochrane 01cecfe2f3 Merge pull request #588 from kencochrane/rackspace-docs
+ Documentation: Added install instructions for RackSpace cloud using Ubuntu 12.04, 12.10, 13.04 and fixed a few minor issues with the ubuntu install docs.
2013-05-13 14:06:15 -07:00
Guillaume J. Charmes 3491957e35 Merge pull request #597 from dotcloud/589-volumes_crash-fix
- Runtime: Make sure that the layer exists prior to store it
2013-05-13 13:09:03 -07:00
Guillaume J. Charmes be9dd7b85f Make sure that the layer exists prior to store it 2013-05-13 13:08:16 -07:00
Guillaume J. Charmes edc7c092d9 Merge pull request #551 from jpetazzo/471-cpu-limit
+ Runtime: implement "-c" option to allocate a number of CPU shares to a container
2013-05-13 11:59:09 -07:00
Ken Cochrane 90b4e097cf Merge pull request #581 from dhrp/actually_rebased_docs
* Documentation - rearranged the documentation so that it is easier to manage and use.
2013-05-13 11:47:26 -07:00
Thatcher Peskens 4551fbd700 Merge remote-tracking branch 'dotcloud/master' into clean-reshuffle 2013-05-13 11:44:52 -07:00
Guillaume J. Charmes 37b80325d0 Merge pull request #593 from dotcloud/579-move_display_options_to_client-feature
* Api: Move display options to client
2013-05-13 11:40:46 -07:00
Victor Vieux 4fb89027e6 add host 2013-05-13 20:34:09 +02:00
Thatcher Peskens 6390d25010 Moved docker-remote-api doc to api section 2013-05-13 11:21:28 -07:00
Thatcher Peskens 097531d853 Merge remote-tracking branch 'dotcloud/master' into clean-reshuffle 2013-05-13 11:12:19 -07:00
Guillaume J. Charmes 02d255457a Merge pull request #591 from dotcloud/590_error_message-fix
Fix error message in export
2013-05-13 10:58:05 -07:00
Guillaume J. Charmes 38bc134db3 Merge pull request #587 from zimbatm/fix/readme-build-example
Fixes the README build example to make it work
2013-05-13 10:50:51 -07:00
Guillaume J. Charmes 9023db5c5d Merge pull request #595 from dotcloud/typo_error-fix
Small fix about the error in push
2013-05-13 10:46:38 -07:00
Guillaume J. Charmes 824ad4274a Change t.Skip to t.Log in tests for go1.0.3 compatibility 2013-05-13 10:45:50 -07:00
Victor Vieux 182842e3c3 fix error push 2013-05-13 19:19:27 +02:00
Victor Vieux a91b710961 add sizes in images and containers 2013-05-13 15:14:20 +02:00
Victor Vieux e82ff22fae add -notrunc on docker images 2013-05-13 12:26:18 +02:00
Victor Vieux 1990c49a62 removed only_ids and trunc_cmd from the api 2013-05-13 12:18:55 +02:00
Victor Vieux 761731215f refactor commands.go into an object, will be easier for tests 2013-05-13 11:48:27 +02:00
Victor Vieux 8b31d30601 fix error message in export 2013-05-13 11:39:24 +02:00
Ken Cochrane 87038311fc fixed the git clone url, it was the read-write one that required ssh access to the docker account, changed to the read only version 2013-05-12 21:46:35 -04:00
Ken Cochrane f074e983bd updated the rackspace docs to have more information, and fixed a couple of mistakes 2013-05-12 13:12:44 -04:00
Ken Cochrane 823bc74935 Added install instructions for RackSpace cloud using Ubuntu 12.04, 12.10, 13.04 2013-05-11 19:03:41 -04:00
Jonas Pfenniger a47d8799b1 Fixes the README build example to make it work 2013-05-11 23:50:06 +01:00
Ken Cochrane 908e4797a6 Merge pull request #584 from boffbowsh/builder-documentation
* Documentation: Updated Docker builder docs to clean up format and add new information and examples
2013-05-11 12:39:44 -07:00
Paul Bowsher 9416574569 Make examples bash-highlighted
Remove DOCKER-VERSION, easier to maintain
Add example of multiple FROM steps
2013-05-11 18:34:26 +01:00
Thomas Bikeev 9cfcfbae52 Made AWS region and ami to be configurable through the ENV variables. 2013-05-11 19:27:42 +02:00
Guillaume J. Charmes dfbea4ad9f Merge pull request #582 from dotcloud/refactor_api_file
* Api: refactor api.go file to ease the streaming
2013-05-10 15:26:32 -07:00
Guillaume J. Charmes 1cce8572e2 Merge branch 'refactor_api_file' of github.com:dotcloud/docker into refactor_api_file 2013-05-10 15:24:25 -07:00
Guillaume J. Charmes b99446831f Update api_test.go to reflect new api.go 2013-05-10 15:24:07 -07:00
Victor Vieux f7beba3acc add writeJson 2013-05-10 15:10:15 -07:00
Victor Vieux 7cc082347f refactor api.go 2013-05-10 15:10:15 -07:00
Paul Bowsher a98eafaf58 Expand upon Builder documentation and tidy
Standardizes on uppercase for instructions, gives 
example usage.
Wrap at 80 columns
2013-05-10 22:49:42 +01:00
Jérôme Petazzoni 6f3e868a7b Merge branch 'master' of github.com:dotcloud/docker into 471-cpu-limit 2013-05-10 14:44:50 -07:00
Guillaume J. Charmes d7adeb8a45 Merge pull request #583 from dotcloud/api-tests-1
* Api: Improve remote api unit tests
2013-05-10 14:34:02 -07:00
Guillaume J. Charmes 052a15ace9 - Registry: Fix the checksums file path 2013-05-10 14:25:45 -07:00
Guillaume J. Charmes ae80c37054 Small fix within TestGetImagesJson 2013-05-10 13:58:21 -07:00
Guillaume J. Charmes 5bec9275c0 Improve remote api unit tests 2013-05-10 12:28:07 -07:00
Thatcher Peskens 8946b75a0b Updated commands index to show better title.
Small syntax fix in couchDB
2013-05-10 12:25:02 -07:00
Victor Vieux 67cdfc0c83 add writeJson 2013-05-10 21:11:59 +02:00
Thatcher Peskens 7557af19d8 Major rearrange of the documentation. 2013-05-10 12:00:12 -07:00
Victor Vieux d270501de2 Merge pull request #575 from odk-/notrunc-container-id
full container.Id display when notrunc is used
2013-05-10 11:35:20 -07:00
Victor Vieux dbc899130c refactor api.go 2013-05-10 20:20:49 +02:00
Victor Vieux 17c1704f4a fix run 2013-05-10 17:00:26 +02:00
Victor Vieux 53a8229ce7 fix tests in api_test.go 2013-05-10 16:49:47 +02:00
odk- 82313b1de9 full container.Id display when notrunc is used 2013-05-10 10:18:01 +02:00
Guillaume J. Charmes 1c5e9f8a88 Merge pull request #571 from dotcloud/569-run_after_rmi-fix
fix run after rmi
2013-05-09 23:02:36 -07:00
Guillaume J. Charmes fae63aa42e Merge pull request #567 from dotcloud/516-xorg-ppa
+ Vagrant: packaging-ubuntu; issue #516: Add xorg kernel to Vagrantfile for stable ubuntu LTS docker distro
2013-05-09 23:01:48 -07:00
Guillaume J. Charmes 26bfeb1d67 Merge pull request #432 from dotcloud/remote-api
+ Remote API: Implement the remote API.
2013-05-09 22:43:47 -07:00
Guillaume J. Charmes 9897e78e32 Update the doc for remote-api 2013-05-09 22:29:12 -07:00
Guillaume J. Charmes 1941c79195 make commands use the correct routes 2013-05-09 22:28:52 -07:00
Guillaume J. Charmes 15ae314cbb Mock Hijack and Implement Unit test for Attach 2013-05-09 21:55:08 -07:00
Guillaume J. Charmes 310fec4819 More unit tests for remote api 2013-05-09 21:54:43 -07:00
Guillaume J. Charmes 28fd289b44 Reduce the Destroy timeout from 10 to 3 seconds 2013-05-09 21:53:59 -07:00
Guillaume J. Charmes 483c942520 Fix typos whithin unit tests 2013-05-09 21:53:28 -07:00
Guillaume J. Charmes eeaea4e873 Update the routes within commands.go 2013-05-09 20:19:21 -07:00
Guillaume J. Charmes 24816a8b80 Add/improve unit tests 2013-05-09 20:13:52 -07:00
Guillaume J. Charmes 0c6380cc32 Rename "v" in "removeVolume" 2013-05-09 19:19:55 -07:00
Guillaume J. Charmes 2a303dab85 Add unit tests 2013-05-09 19:19:24 -07:00
Guillaume J. Charmes ede0793d94 Add unit tests for remote api 2013-05-09 17:51:27 -07:00
Guillaume J. Charmes 152ebeea43 Change API route for containers/ and images/ in order to avoid conflict 2013-05-09 17:50:56 -07:00
Guillaume J. Charmes ff67da9c86 Add the variable maps to the Api functions 2013-05-09 16:28:47 -07:00
Victor Vieux add73641e6 fixed private caller 2013-05-10 01:23:50 +02:00
Victor Vieux 9af5d9c527 Merge branch 'remote-api' of https://github.com/dotcloud/docker into remote-api 2013-05-10 01:20:33 +02:00
Victor Vieux 3115c5a225 private tests api fixed 2013-05-10 01:20:07 +02:00
Guillaume J. Charmes 7e8b413bcf Implement the some unit tests without listenandserve 2013-05-09 16:20:06 -07:00
Guillaume J. Charmes b2b59ddb10 Remove ListenAndServe from unit tests 2013-05-09 15:47:06 -07:00
Victor Vieux c423a790d6 fixed issue with viz 2013-05-09 23:52:12 +02:00
Guillaume J. Charmes 074a566164 Small fix in graph_test.go 2013-05-09 14:48:10 -07:00
Victor Vieux 93dc2c331e removed hijack in export 2013-05-09 23:28:03 +02:00
Victor Vieux 0ecf5e245d removed hijack on viz 2013-05-09 23:10:26 +02:00
Guillaume J. Charmes e289308dff Bumped version to 0.3.2 2013-05-09 13:51:32 -07:00
Guillaume J. Charmes 8fb8a08ff2 Merge pull request #568 from dotcloud/improve_checksum-2
* Runtime: Store the actual archive on commit
* Registry: Improve the checksum process
- Registry: Fix error 400 on push
2013-05-09 13:25:15 -07:00
Guillaume J. Charmes 30f009150f Fix error code message upon error on push 2013-05-09 13:24:00 -07:00
Victor Vieux 0862183c86 fix status code and error detection 2013-05-09 21:42:29 +02:00
Guillaume J. Charmes 0410397704 Update basics.rst 2013-05-09 13:05:18 -06:00
Victor Vieux 0bcc5d3bee re-add previously deleted doc files 2013-05-09 20:36:08 +02:00
Victor Vieux b5831eda1e merge master 2013-05-09 20:32:53 +02:00
Victor Vieux 7c7619ecf8 display warning on the server in debug in version don't match 2013-05-09 20:24:49 +02:00
Guillaume J. Charmes 3cbf5670c5 Send the images in correct order 2013-05-09 11:12:37 -07:00
Victor Vieux 0a5d86d7be fix run after rmi 2013-05-09 18:57:47 +02:00
Victor Vieux 4576e11121 fix attach and remove cli doc 2013-05-09 17:54:41 +02:00
Guillaume J. Charmes 55cf05835b Remove the pushImageRec and use iteration instead 2013-05-08 23:29:02 -07:00
Guillaume J. Charmes c7a7983fcb Improve the checksum process 2013-05-08 22:45:40 -07:00
Guillaume J. Charmes 44b33b44aa Factorize the checksums functions 2013-05-08 22:37:33 -07:00
Guillaume J. Charmes 463658dc8f Refactor PushRepository to fix error 400 and to increase processing speed 2013-05-08 22:06:23 -07:00
Guillaume J. Charmes 80f4b0df75 * Registry: Use the size to have a good progress bar while pushing
* Registry: Use the actual archive if it exists in order to speed up the push
+ Registry: Remove the archive if it exists after the push
2013-05-08 19:36:12 -07:00
Daniel Mizyrycki 73321f27f4 packaging-ubuntu; issue #516: Add xorg kernel to Vagrantfile for stable ubuntu LTS docker distro 2013-05-08 19:36:06 -07:00
Guillaume J. Charmes aaaf3f0726 Store the actual archive when commit 2013-05-08 19:08:11 -07:00
Victor Vieux 842cb8909e pretty print json in inspect 2013-05-09 03:46:39 +02:00
Victor Vieux fc29f01528 bump to master 2013-05-09 02:20:16 +02:00
Thatcher eed64e6777 Merge pull request #566 from dhrp/move-website-to-dir
Moved the static website html pages to their own folder under docs.
2013-05-08 17:13:45 -07:00
Thatcher Peskens 0f4469c2b1 Moved the static website html pages to their own folder under docs.
This should make previewing documentation easier.
Also updated the Makefile to now copy the theme dir into the _build/website/ dir. Make connect and Make push work.
2013-05-08 17:05:46 -07:00
Guillaume J. Charmes 06767fb99d Bumped version to 0.3.1 2013-05-08 16:52:47 -07:00
Guillaume J. Charmes 5098c4fc00 Display the go version inf CmdInfo in non-debug mode 2013-05-08 16:40:48 -07:00
Guillaume J. Charmes c255976909 Merge pull request #557 from dotcloud/improve_checksum
* Registry: Improve checksum
2013-05-08 16:30:42 -07:00
Guillaume J. Charmes 0e23b4e10e Store the checksums when pulling a repository 2013-05-08 16:27:35 -07:00
Guillaume J. Charmes d6c24092eb + Runtime: Add go version to debug infos 2013-05-08 15:35:35 -07:00
Victor Vieux 24c785bc06 fix login 2013-05-08 23:57:14 +02:00
Guillaume J. Charmes 6cafed45af Better error output upon push failure 2013-05-08 14:19:38 -07:00
Victor Vieux 1d42cbaa21 removed useless returns 2013-05-08 23:19:24 +02:00
Guillaume J. Charmes 3484781a6f Merge pull request #562 from tianon/go1.1
- Makefile: Swap "go get" for "go get -d", especially to compile on go1.1rc
2013-05-08 14:15:03 -07:00
Tianon Gravi c4ad6b077d Swap "go get" for "go get -d", especially to compile on go1.1rc; fixes #561 2013-05-08 14:51:50 -06:00
Ken Cochrane 45b5d3027e Merge pull request #559 from dhrp/docs-table-th-fix
- Documentation: CSS fix for docker documentation to make REST API docs look better.
2013-05-08 12:18:33 -07:00
Thatcher Peskens 070b1cd541 Added a line to css to make sure th woul align left. 2013-05-08 12:13:31 -07:00
Guillaume J. Charmes 8ff1765674 Make the checksum async within commit 2013-05-08 12:01:12 -07:00
Guillaume J. Charmes c4ebf870c8 Use make instead of new 2013-05-08 10:35:41 -07:00
Victor Vieux bf605fcfc7 fix commit without run parameter 2013-05-08 19:21:52 +02:00
Victor Vieux 954ecac388 fix doc and empty content-type 2013-05-08 18:52:01 +02:00
Victor Vieux 4a1e0d321e change content-type and small fix in run 2013-05-08 18:36:37 +02:00
Victor Vieux bc3fa506e9 added pagination on ps 2013-05-08 18:28:11 +02:00
Victor Vieux 075e1ebb0e remove useless port endpoint 2013-05-08 18:06:43 +02:00
Victor Vieux 60ddcaa15d changes 2 endpoints to avoid confusion, changed some parameters, fix doc, add api unit tests 2013-05-08 17:35:50 +02:00
Guillaume J. Charmes cacc7e564a Fix non exiting client issue 2013-05-07 23:32:17 -07:00
Guillaume J. Charmes 2ac4e662f1 Small fix 2013-05-07 18:16:24 -07:00
Guillaume J. Charmes 57cfe72e8c Replace os.File with io.ReadCloser and io.Writer 2013-05-07 18:06:49 -07:00
Guillaume J. Charmes 755604a2bd Fix routes in api.go 2013-05-07 17:35:33 -07:00
Guillaume J. Charmes 891c5202ea Factorize api.go 2013-05-07 17:27:09 -07:00
Guillaume J. Charmes ab96da8eb2 Use bool instead of string for flags 2013-05-07 16:47:43 -07:00
Guillaume J. Charmes 279db68b46 Use Fprintf instead of Fprintln 2013-05-07 16:36:49 -07:00
Guillaume J. Charmes b56b2da5c5 Refactor api.go to use a factory with named functions 2013-05-07 16:33:12 -07:00
Victor Vieux a0880edc63 removed useless buffered pipe in import 2013-05-07 23:56:45 +02:00
Victor Vieux 4d30a32c68 removed RAW mode on server 2013-05-07 23:15:42 +02:00
Victor Vieux a5b765a769 remove useless wait in run 2013-05-07 22:52:58 +02:00
Victor Vieux ac0e27699c display id on run -s stdin 2013-05-07 21:36:24 +02:00
Victor Vieux 32cbd72ebe Merge branch 'master' into remote-api 2013-05-07 21:02:32 +02:00
Victor Vieux 4079411375 fix run no parameter 2013-05-07 20:59:04 +02:00
Jérôme Petazzoni eef8b0d406 propagate CpuShares in mergeConfig 2013-05-07 11:44:38 -07:00
Jérôme Petazzoni af9f559f2e in the tests, use a non-default value for cpu.shares 2013-05-07 11:44:24 -07:00
Jérôme Petazzoni e36752e033 if -c is not specified, do not set cpu.shares (instead of using the default value of 1024) 2013-05-07 11:43:45 -07:00
Victor Vieux 59a6316f5e added search 2013-05-07 20:43:31 +02:00
Guillaume J. Charmes 7b1ec9ff30 Merge pull request #539 from justone/fix-byparent
- Images: fix ByParent function
2013-05-07 11:34:59 -07:00
Guillaume J. Charmes 244e6022ec Merge pull request #550 from unclejack/handle-empty-kernel-flavor-without-dash
* Runtime: kernel version - don't show the dash if flavor is empty
2013-05-07 11:24:25 -07:00
Guillaume J. Charmes f8dd04d567 Merge pull request #552 from dotcloud/548-no_command_panic-fix
- Builder: Check the command existance prior create and add Unit tests for the case
2013-05-07 11:19:34 -07:00
Guillaume J. Charmes 42b1ea4889 Check the command existance prior create and add Unit tests for the case 2013-05-07 11:18:13 -07:00
Jérôme Petazzoni efd9becb78 implement "-c" option to allocate a number of CPU shares to a container 2013-05-07 11:16:30 -07:00
unclejack d2eb2455a1 kernel version - don't show the dash if flavor is empty 2013-05-07 20:57:21 +03:00
Guillaume J. Charmes a2b5196061 Merge pull request #543 from dotcloud/pull-official-tag-fix
- Registry: Fix pull for official images with specific tag
2013-05-07 10:56:37 -07:00
Ken Cochrane f46ab22b7a Merge pull request #544 from DanielVF/master
- Documentation: Fixed CouchDB example page header mistake
2013-05-07 10:51:35 -07:00
Ken Cochrane 074310063d Merge pull request #535 from dhrp/website_update
* Documentation: updated www.docker.io website.
2013-05-07 10:45:29 -07:00
Guillaume J. Charmes 01575e1f67 Merge pull request #542 from dotcloud/docker-search
+ Registry: Add docker search top level command in order to search a repository
2013-05-07 10:43:19 -07:00
Victor Vieux 97fdfab446 Merge branch 'master' into remote-api 2013-05-07 19:42:36 +02:00
shin- 82513815f1 Added actual doc file 2013-05-07 10:31:55 -07:00
shin- 4df26b9ee7 Added doc page for new search command 2013-05-07 10:29:49 -07:00
Victor Vieux 10c0e99037 update to master 2013-05-07 19:23:50 +02:00
Ken Cochrane fc2df7e634 Merge pull request #546 from shamrin/patch-3
- Documentation: fixed README formatting
2013-05-07 10:01:16 -07:00
Victor Vieux 0b6c79b303 first draft of the doc, split commit and fix some issues in spi.go 2013-05-07 17:19:41 +02:00
Alexey Shamrin c718eb282b README: fix Markdown formatting 2013-05-07 17:57:26 +04:00
Daniel Von Fange 0a13ce9bef CouchDB example page was titled redis 2013-05-07 08:33:29 -04:00
Joffrey F 0a197f9b4f Fixes bug when pulling an official image (no user namespace) with a specified tag 2013-05-07 04:54:58 -07:00
shin- 3d25e09c3b missing comma 2013-05-07 03:54:31 -07:00
shin- d56c5406ac Implemented command 2013-05-07 03:49:08 -07:00
Nate Jones 23c5c13014 fix ByParent 2013-05-06 21:31:59 -07:00
Guillaume J. Charmes 6ac33eb649 Merge pull request #523 from steakknife/522-docker-build
* Builder: use any whitespaces instead of tabs
2013-05-06 19:06:11 -07:00
Guillaume J. Charmes a02ad8c896 Merge pull request #537 from dotcloud/builder-env
+ Builder: Implement ENV within docker builder
2013-05-06 18:57:15 -07:00
Guillaume J. Charmes 4c7c177e4e Add the ENV instruciton to the docker builder documentation 2013-05-06 18:54:27 -07:00
Guillaume J. Charmes e45aef0c82 Implement ENV within docker builder 2013-05-06 18:39:56 -07:00
Guillaume J. Charmes 8472a27e80 Merge pull request #497 from justone/dot-graph-images
+ images: output graph of images to dot (graphviz)
2013-05-06 17:48:07 -07:00
Thatcher Peskens 0d929d13d3 Updated index to reflect new (short) 'engine' message (merged with solomon's new text), also moved around the layout a bit and fixed some small text errors. 2013-05-06 17:41:51 -07:00
Guillaume J. Charmes a0d80ed3e6 Merge pull request #534 from dotcloud/510-update-go
* Packaging: packaging ubuntu; issue #510: Use goland-stable PPA package to build docker
2013-05-06 17:27:02 -07:00
Guillaume J. Charmes e8853ec3a4 Merge pull request #532 from dotcloud/login_cookie_fix
- Registry: Fix issue when login in with a different user and trying to push
2013-05-06 17:23:57 -07:00
Guillaume J. Charmes 8ea9811089 Merge pull request #512 from dotcloud/builder-doc
+ Documentation: Add the documentation for docker builder
2013-05-06 17:22:35 -07:00
Guillaume J. Charmes f3f2cba386 Merge pull request #504 from dotcloud/builder-autorun
+ Builder: Implement the autorun capability within docker builder
2013-05-06 17:21:31 -07:00
Guillaume J. Charmes d581f0808c Merge pull request #511 from dotcloud/builder-cache
+ Builder: Add caching to docker builder
2013-05-06 17:20:22 -07:00
Guillaume J. Charmes ce4e87196f Merge pull request #472 from dotcloud/builder
+ Builder: Add support for docker builder with native API as top level command
2013-05-06 17:18:56 -07:00
Guillaume J. Charmes 7757be1f45 Rebase fix 2013-05-06 17:12:56 -07:00
Guillaume J. Charmes 49b05eb24a Update docker builder doc 2013-05-06 17:10:42 -07:00
Guillaume J. Charmes dae2828957 Moving runtime.Create to builder.Create 2013-05-06 17:09:58 -07:00
Guillaume J. Charmes 3439cd9cea Rebase fix 2013-05-06 17:07:56 -07:00
Guillaume J. Charmes 979db00d9a Fix typo in builder 2013-05-06 17:01:59 -07:00
Guillaume J. Charmes db4417b601 Implement the CMD instruction in order to allow autorun 2013-05-06 17:01:59 -07:00
Guillaume J. Charmes a64ebe5feb Allow to stack multiple EXPOSE instructions 2013-05-06 17:01:59 -07:00
Guillaume J. Charmes 602786cd60 Moving runtime.Create to builder.Create 2013-05-06 17:00:51 -07:00
Guillaume J. Charmes 35c59f4e05 Rebase fix 2013-05-06 16:58:09 -07:00
Guillaume J. Charmes 756df27e45 Add compatibility with contrib builder 2013-05-06 16:44:37 -07:00
Guillaume J. Charmes a46fc3a59e Implement caching for docker builder 2013-05-06 16:44:37 -07:00
Guillaume J. Charmes 9959e2cd63 Rebase master (autorun) 2013-05-06 16:44:37 -07:00
Guillaume J. Charmes f911ccc27b Moving runtime.Create to builder.Create 2013-05-06 16:44:37 -07:00
Guillaume J. Charmes 96069de4e0 Add build command 2013-05-06 16:44:37 -07:00
Guillaume J. Charmes d92166cc79 Fix merge issue 2013-05-06 16:43:50 -07:00
Guillaume J. Charmes ebb59c1125 Remove the open from CmdBuild 2013-05-06 16:42:54 -07:00
Guillaume J. Charmes e2880950c5 Add build command 2013-05-06 16:42:53 -07:00
Guillaume J. Charmes 62a1850c16 Make the autopull compatible with new registry 2013-05-06 16:40:45 -07:00
Guillaume J. Charmes 2bc4ad9402 Rebase fix 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes ae1e655fb1 Implement EXPOSE to builder 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes 92e98c66af Implement MAINTAINER to builder 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes 6d6a03dfba More consistent docker build test 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes 924b61328c Make the FROM instruction pull the image if not existing 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes 4ebec08add Trim the splited builder lines 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes 15ea5a479a Update the TestBuild with new format 2013-05-06 16:01:01 -07:00
Guillaume J. Charmes 6c168a8986 Rebase master (autorun) 2013-05-06 16:01:00 -07:00
Guillaume J. Charmes 4386edff0b Better varibale names 2013-05-06 16:01:00 -07:00
Guillaume J. Charmes 6bfb652f5b Change dockerbulder format, no more tabs and COPY becomes INSERT to avoid conflict with contrib script 2013-05-06 16:01:00 -07:00
Guillaume J. Charmes bbb634a980 Add doc for the builder 2013-05-06 16:01:00 -07:00
Guillaume J. Charmes 034c7a7a5e Remove the open from CmdBuild 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 4390a3182f Fix image pipe with Builder COPY 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes e337949cb0 Add builder_test.go 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes dade95844f Make Builder.Build return the builded image 2013-05-06 16:00:30 -07:00
Nate Jones 74b9e851f6 use new image as base of next command 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes ff95f2b0ec Update the unit tests to reflect the new API 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes f7c5e92a2e Move runtime.Commit to builder.Commit 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 6f2125386a Moving runtime.Create to builder.Create 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 0aebb25410 Implement the COPY operator within the builder 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 9db4972a70 Make sure the destination directory exists when using docker insert 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 9751483112 Add insert command in order to insert external files within an image 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 7bccdc0d33 Add a Builder.Commit method 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 97215ca384 make builder.Run public it now runs only given arguments without sh -c 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes b8f66c0d14 Clear the containers/images upon failure 2013-05-06 16:00:30 -07:00
Guillaume J. Charmes 27319da0d2 Add build command 2013-05-06 16:00:30 -07:00
Tianon Gravi 2f89315bf8 Update mkimage-debian.sh now that wheezy is officially the stable release - also, we can't rely on "release" versions for testing or unstable - only "stable" has reliable release versions 2013-05-06 17:00:21 -06:00
Guillaume J. Charmes f20b5e1323 Fix issue when login in with a different user and trying to push 2013-05-06 15:58:04 -07:00
Daniel Mizyrycki 15b85d9d76 packaging ubuntu; issue #510: Use goland-stable PPA package to build docker 2013-05-06 15:56:50 -07:00
Solomon Hykes b6af9d3d2e * Website: put Adam's and Mitchell's nice tweets on top :) 2013-05-06 14:26:58 -07:00
Solomon Hykes f796b9c76e * Website: Bigger twitter profile pictures 2013-05-06 14:26:07 -07:00
Solomon Hykes 627f7fdbfd + Website: new quotes 2013-05-06 14:24:14 -07:00
Solomon Hykes b38fc9fcdc Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-06 14:13:27 -07:00
Solomon Hykes 8646f7f11c + Website: new high-level overview 2013-05-06 14:11:38 -07:00
Guillaume J. Charmes 87cc8b6058 Update documentation, use docker-latest instead of docker-master 2013-05-06 13:26:23 -07:00
Guillaume J. Charmes 0fabd390a9 Update ubuntulinux.rst 2013-05-06 13:11:08 -07:00
Solomon Hykes 2ac7298e4e Bring back lego picture 2013-05-06 12:24:44 -07:00
Solomon Hykes 840bde4393 + Documentation: new introduction and high-level overview 2013-05-06 12:17:51 -07:00
Guillaume J. Charmes bbad653b1a Update ubuntulinux.rst 2013-05-06 12:00:39 -07:00
Victor Vieux 5a2a5ccdaf removed rcli completly 2013-05-06 16:59:33 +02:00
Victor Vieux f37399d22b added login and push 2013-05-06 13:34:31 +02:00
Victor Vieux 6f9b574f25 bump to 0.2.2 2013-05-06 11:53:00 +02:00
Victor Vieux 04cd20fa62 split api and server. run return exit code. import, pull and commit uses the smae endpoint. non zero status code on failure 2013-05-06 11:31:22 +02:00
Guillaume J. Charmes 4f202cd07f Bumped version to 0.3.0 2013-05-05 07:46:25 -07:00
Guillaume J. Charmes da01dd3d56 Merge remote-tracking branch 'origin/registry-update'
+ Registry: Add the new registry support
2013-05-05 07:13:25 -07:00
shin- 09f1cbabb9 Fixed imports 2013-05-06 11:06:44 -07:00
Sam Alba c9994ed0fb Moved the Debugf message in a registry to a more useful place 2013-05-06 10:57:48 -07:00
Guillaume J. Charmes b0e076f374 Add output to checksums, code cleaning 2013-05-06 10:57:46 -07:00
Sam Alba 00266df8ac Fixed public pull + Added some verbosity about what is happening 2013-05-06 10:57:45 -07:00
Sam Alba 3febeb93f5 Added help message to invite to login when getting a 401 2013-05-06 10:57:43 -07:00
Sam Alba bcdf03037b Fixed pulling repositories from library 2013-05-06 10:57:41 -07:00
Sam Alba a372f982c1 Switching to prod index server 2013-05-06 10:57:38 -07:00
shin- d985050aeb gofmt pass 2013-05-06 10:57:36 -07:00
shin- 0c5e76958b Use progress reader when uploading/downloading layers 2013-05-06 10:57:06 -07:00
Sam Alba 0f68042053 Handled wrong user credentials by re-init the auth file (it was impossible to login after having wrong crendentials) 2013-05-06 10:57:03 -07:00
shin- 18796d55a6 Fixed some login quirks 2013-05-06 10:57:00 -07:00
shin- 594827d416 Fixed typo in 'username or email already exists' 2013-05-06 10:56:59 -07:00
shin- 5690562fc8 Fix error in PushImage 2013-05-06 10:56:57 -07:00
shin- be791a223b simplify image.Checksum 2013-05-06 10:56:55 -07:00
shin- 19045b530e simplify graph.Checksums 2013-05-06 10:56:54 -07:00
shin- b5873806d0 Only send checksums for images not uploaded yet 2013-05-06 10:56:52 -07:00
shin- f10b0f75e0 Fix checksum computing 2013-05-06 10:56:50 -07:00
shin- 6e2ddf6f60 Checksum system overhaul 2013-05-06 10:56:49 -07:00
shin- e81a53eea9 Added support for REPO:TAG format in docker pull (overrides -t option) 2013-05-06 10:56:47 -07:00
shin- 1c76f91fc4 Fixed minor bugs in docker pull 2013-05-06 10:56:45 -07:00
shin- be75608906 Fixed checksum computing. Ensure checksum is computed when image metadata is loaded from disk. Fixed docker push workflow. Moved hash computing to utils 2013-05-06 10:56:10 -07:00
shin- 3c85e9390e Added X-Docker-Token header to initial index requests 2013-05-06 10:54:57 -07:00
shin- ea3374bcb0 Prepend hash method to the image checksum 2013-05-06 10:54:55 -07:00
shin- 6e936c8fd3 Follow redirections when sending PUT request in PushRepository 2013-05-06 10:54:53 -07:00
shin- 4cd9e4722c Fixed graph.Checksums() 2013-05-06 10:54:52 -07:00
shin- 630d358384 Fixed checksum representation 2013-05-06 10:54:50 -07:00
shin- 84be35dce1 Fixed docker login 2013-05-06 10:54:48 -07:00
shin- 23953e7d67 Style changes in auth.Login 2013-05-06 10:54:46 -07:00
shin- 6644a3c78a Reactivated CmdPush in commands.go 2013-05-06 10:54:45 -07:00
shin- e179c66400 Reimplemented docker pull for new registry API (command is still deactivated) 2013-05-06 10:54:41 -07:00
shin- 048fd671ef Implemented checksum computation on image creation (necessary for new push primitive) 2013-05-06 10:52:42 -07:00
shin- 7c1a27e2ad gofmt pass 2013-05-06 10:52:10 -07:00
shin- 1cf8a2c26c Changed some of the routes to reflect changes made to the API ; added HTTPClient singleton to the graph object 2013-05-06 10:52:08 -07:00
shin- e639309a7a Reimplemented feature: downloading all tags on a repository using docker pull. Temporarily commented out CmdPush 2013-05-06 10:51:10 -07:00
shin- 2f082510a7 Implemented new version of PullRepository. Missing support for whole repository pull (= no tag specified) 2013-05-06 10:51:07 -07:00
shin- 2421838b0a Support for the new registry/index API (wip) 2013-05-06 10:51:04 -07:00
Ken Cochrane 58ca46af39 Merge pull request #500 from kencochrane/registry-api-doc
added Docker Index search API doc
2013-05-06 10:44:50 -07:00
Ken Cochrane 09d4b9452d added new sphinx contrib extention for better REST API docs, and changed the index search API so that it uses the new docs, as a test to make sure it works correctly 2013-05-06 13:38:51 -04:00
Ken Cochrane d78b2d4ade Merge github.com:dotcloud/docker into registry-api-doc 2013-05-06 13:13:17 -04:00
Barry Allard 424cc678eb closes #522 2013-05-04 21:20:41 -07:00
Solomon Hykes 1561232261 First draft of new README. Feedback and contributions welcome! 2013-05-04 19:47:57 -07:00
Solomon Hykes e392b7ee9b Merge pull request #515 from drnic/vagrant_overrides
Allow reuse of existing vagrant boxes by env variables
2013-05-04 16:47:17 -07:00
Guillaume J. Charmes c3a5dd76cf Merge pull request #520 from dotcloud/519-no_command_specified-fix
- runtime: Fix the command existance check
2013-05-04 12:03:08 -07:00
Nate Jones 359ecf88de add doc for images -viz 2013-05-03 21:12:43 -07:00
Nate Jones 3dba4022ad add tests for 'images' subcommand 2013-05-03 21:12:43 -07:00
Nate Jones f4de9d919d add image graph output (dot/graphviz) 2013-05-03 21:12:43 -07:00
Dr Nic Williams 04f41ebdbc Allow reuse of existing vagrant boxes by env variables
Usage:

    BOX_NAME=precise64 vagrant up
2013-05-03 15:35:51 -07:00
Guillaume J. Charmes c34989f1c4 Merge pull request #501 from losinggeneration/fix_cgroup_memory_check
- runtime: strings.Split may return an empty string on no match
2013-05-03 14:29:43 -07:00
Solomon Hykes a7c0e9a355 Fix a bug in the Makefile which caused dependency download to fail 2013-05-03 12:58:44 -07:00
Guillaume J. Charmes 19df5a7965 Merge pull request #487 from brunoqc/patch-2
* vagrant: Use only one deb line in /etc/apt
2013-05-03 11:55:16 -07:00
Harley Laue 589d7c68db Check that the line is valid with 6 parts after split 2013-05-03 13:49:10 -05:00
Guillaume J. Charmes 8ef72cbc94 Merge pull request #508 from bdon/master
* docs: doc fix
2013-05-03 11:41:14 -07:00
Victor Vieux 75418ec849 Merge branch 'master' into remote-api 2013-05-03 17:59:11 +02:00
Victor Vieux c6963da54e makefile from master 2013-05-03 17:51:11 +02:00
Guillaume J. Charmes b9ec03c21b Fix the command existance check 2013-05-02 20:50:28 -07:00
Brandon Liu 6cbe27b7a5 correct documentation for where images are stored on filesystem. 2013-05-02 20:37:08 -07:00
Solomon Hykes a82b60b30d dockerbuilder: change order of dependencies 2013-05-02 19:22:41 -07:00
Solomon Hykes c08d245539 dockerbuilder: let the Makefile upload to s3 with 'make release' 2013-05-02 18:11:54 -07:00
Guillaume J. Charmes 64d7bc442d Fix server crash when running an image without command without autorun 2013-05-02 13:56:45 -07:00
Harley Laue 4bc8ef42d4 strings.Split may return an empty string on no match
* This fixes an index out of range crash if cgroup memory is not
  enabled.
2013-05-02 14:44:41 -05:00
Guillaume J. Charmes 8378498951 Fix issue within mergeConfig preventing hostname and user to be set 2013-05-02 12:32:10 -07:00
Guillaume J. Charmes 1617a18258 Fix typo for command run docs 2013-05-02 12:11:57 -07:00
Solomon Hykes 6c1bb39c09 Fix date typos in changelog 2013-05-03 15:40:32 -07:00
Solomon Hykes f6b5cd77eb Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-03 15:37:37 -07:00
Solomon Hykes 5ffd63070f Bumped version to 0.2.2 2013-05-03 15:19:20 -07:00
Solomon Hykes 701132259d + Documentation: new example: sharing data between 2 couchdb databases 2013-05-03 15:13:12 -07:00
Solomon Hykes 18b8eeb484 + Support for data volumes 2013-05-03 13:03:47 -07:00
Solomon Hykes b6a5e604ab Add s3 upload to 'make release' 2013-05-02 11:32:55 -07:00
Ken Cochrane b682a8ea9e added Docker Index search API doc 2013-05-02 14:32:38 -04:00
Solomon Hykes 6e486b638b + Hack: 'make s3release' uploads a clean build to s3 2013-05-02 11:25:49 -07:00
Bruno Bigras 74cd7e822d Use only one deb line in /etc/apt
This prevents the script from filling up /etc/apt/sources.list with more than one deb line which cause a warning when updating.
2013-05-02 13:33:23 -04:00
Victor Vieux 4f0bda2dd5 up to date with master 2013-05-02 18:36:23 +02:00
Guillaume J. Charmes 21b9dcd518 Update docs for Command Run 2013-05-02 09:26:29 -07:00
Guillaume J. Charmes 897cc573f0 Fix the graph.Create prototype 2013-05-02 09:23:29 -07:00
Guillaume J. Charmes b0459adc27 Comply to the new graph.Create() prototype 2013-05-02 09:14:23 -07:00
Guillaume J. Charmes 3edd14b8c2 Implement the data volume removal 2013-05-02 09:14:23 -07:00
Guillaume J. Charmes 4099a31304 Implement the -volumes-from in order to mount volumes from an other container 2013-05-02 09:14:22 -07:00
Guillaume J. Charmes 6fb495bf6f Move the id of volumes to Container (instead of Container.Config) 2013-05-02 09:14:22 -07:00
Guillaume J. Charmes faf8daa7c6 Switch back config to map[string]struct{} 2013-05-02 09:14:22 -07:00
Guillaume J. Charmes 8d9aaee60b Handle data volumes mount points 2013-05-02 09:14:22 -07:00
Guillaume J. Charmes 35d704c8a0 Change the volumes type to map[string]string to store both source and destination 2013-05-02 09:14:22 -07:00
Solomon Hykes 1df5f4094b docker run -v PATH: bind a new data volume to a container 2013-05-02 09:14:22 -07:00
unclejack 528da23d6a use Go 1.0.3 to build docker 2013-05-02 15:27:37 +03:00
Guillaume J. Charmes ff5e238de9 Merge pull request #496 from dotcloud/480-vagrant-fix
- vagrant: Fix main Vagrantfile
2013-05-01 23:38:18 -07:00
Solomon Hykes c63dce393e Merge pull request #492 from kencochrane/registry-api-doc
+ Registry: added the registry API to the docker docs
2013-05-01 23:00:58 -07:00
Solomon Hykes d6a63132ef Merge branch 'origin/new-dockerbuilder' 2013-05-02 05:57:50 +00:00
Solomon Hykes e7271cdaae dockerbuilder: fix permissions 2013-05-02 05:56:51 +00:00
Solomon Hykes 6ca3b151b1 * Hack: improve the way dockerbuilder is built 2013-05-01 22:05:36 -07:00
Victor Vieux a4bcf7e1ac refactoring run/attach/logs 2013-05-02 05:07:06 +02:00
Daniel Mizyrycki 0d9475346f Fix main Vagrantfile 2013-05-01 18:49:31 -07:00
Solomon Hykes 71199f595d New Dockerfile operation: 'add' 2013-05-01 18:32:38 -07:00
Solomon Hykes 58b95878f1 - Hack: fix dockerbuilder to build feature branches 2013-05-02 01:16:23 +00:00
Guillaume J. Charmes e431dc26f1 Merge pull request #482 from dotcloud/move_capabilitie_function
* runtime: Move the capabilities detection into a runtime method
2013-05-01 17:43:32 -07:00
Solomon Hykes 09b1cd58c0 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-05-01 17:18:05 -07:00
Solomon Hykes d42639e5c5 Bumped version to 0.2.1 2013-05-01 17:17:13 -07:00
Guillaume J. Charmes d0c2e31fb9 Merge pull request #495 from dotcloud/autorun_docs
* docs: Update commandline Commit doc
2013-05-01 17:14:53 -07:00
Guillaume J. Charmes 509a01bbe4 Merge pull request #493 from dotcloud/374-developer-environment
* hack: development; issue #374: Refactor 'make hack' making Vagrantfile and VM more useful
2013-05-01 16:54:29 -07:00
Solomon Hykes e7fb7f13d5 new Dockerfile keyword: cmd to set a default runtime command 2013-05-01 16:43:37 -07:00
Daniel Mizyrycki d172da58ce development; issue #374: Update VM documentation 2013-05-01 15:59:54 -07:00
Solomon Hykes ad86dde10c * 'docker commit' inherits parent layer's run configuration by default 2013-05-01 15:45:39 -07:00
Guillaume J. Charmes c20e46587d Update commandline Commit doc 2013-05-01 15:43:02 -07:00
Daniel Mizyrycki eeb03164cf development; issue #374: Upgrade development VM box to Ubuntu-13.04 with kernel 3.8 2013-05-01 15:26:27 -07:00
Daniel Mizyrycki bb61678b57 development; issue #374: Refactor 'make hack' making Vagrantfile and VM more useful 2013-05-01 15:26:27 -07:00
Guillaume J. Charmes a75a1b3859 When no -config is set while committing, use the config of the base image 2013-05-01 15:24:28 -07:00
Solomon Hykes 08812096f5 New Dockerfile operation 'expose' exposes default tcp ports 2013-05-01 14:16:56 -07:00
Solomon Hykes 5c30faf6f7 Set a layer's default runtime options with 'docker commit -run' instead of 'docker commit -config' 2013-05-01 12:45:45 -07:00
Solomon Hykes f7aaa06606 + Commit default runtime options with a layer 2013-05-01 11:33:21 -07:00
Guillaume J. Charmes 7ff65d40d5 Actually use the mergeConfig function 2013-05-01 11:22:06 -07:00
Ken Cochrane 904c2a0fc3 added the registry API to the docker docs 2013-05-01 12:31:46 -04:00
Solomon Hykes a3ce90b78b Added dummy script for docker-build example 2013-05-01 00:49:28 -07:00
Solomon Hykes 03b83b3210 Fix example dockerfile 2013-05-01 00:44:36 -07:00
Solomon Hykes 40ccf1d300 new Dockerfile keyword: 'push' 2013-05-01 00:42:11 -07:00
Solomon Hykes 038ca5ee39 docker-build: added support for 'maintainer' keyword 2013-05-01 00:14:52 -07:00
Solomon Hykes 957c500ac9 Merge pull request #485 from brunoqc/patch-1
* Packaging: connect to Ubuntu key server on port 80
2013-04-30 15:46:57 -07:00
Guillaume J. Charmes 62a595da5c Merge pull request #488 from tobert/cgroups-via-proc-mounts
* runtime: Use /proc/mounts instead of mount(8)
2013-04-30 14:39:14 -07:00
Guillaume J. Charmes d97661aa71 Improve crashTest 2013-04-30 11:16:26 -07:00
Al Tobey c6119da339 Use /proc/mounts instead of mount(8)
Specifically, Ubuntu Precise's cgroup-lite script uses mount -n
to mount the cgroup filesystems so they don't appear in mtab, so
detection always fails unless the admin updates mtab with /proc/mounts.

/proc/mounts is valid on just about every Linux machine in existence and
as a bonus is much easier to parse.

I also removed the regex in favor of a more accurate parser that should
also support monolitic cgroup mounts (e.g. mount -t cgroup none /cgroup).
2013-04-30 17:37:43 +00:00
Victor Vieux 36b968bb09 [] instead fon null, timetsamps and wip import 2013-04-30 17:04:31 +02:00
Bruno Bigras 5051c20833 Use the 80 port with keyserver.ubuntu.com
Use the 80 port with keyserver.ubuntu.com so it works with corporate firewalls
2013-04-29 15:53:50 -03:00
Victor Vieux 131c6ab3e6 more accurate http errors, attach handle tty correctly now 2013-04-29 17:46:41 +02:00
Victor Vieux e5104a4cb4 working tty 2013-04-29 15:12:18 +02:00
Victor Vieux 22f5e35579 fix last commit 2013-04-29 11:49:04 +02:00
Victor Vieux 30cb4b351f run now try to pull if unknown image 2013-04-29 11:46:31 +02:00
Guillaume J. Charmes cdc2657ee9 Improve crashTest 2013-04-28 07:10:58 -07:00
Guillaume J. Charmes 76a1a7cf5b Simplify the crashTest 2013-04-28 06:23:02 -07:00
Guillaume J. Charmes 20c2a4f80f add network endpoint for crashTest 2013-04-28 03:54:22 -07:00
Guillaume J. Charmes ebe157ebb5 Update the crashTest to have the dockerpath in env 2013-04-28 01:27:56 -07:00
Solomon Hykes cb431f223f Merge pull request #484 from tianon/mkimage-debian
* Contrib: updated mkimage-debian
2013-04-29 12:12:02 -07:00
Tianon Gravi ab34115b42 Use default mirror from debootstrap when not explicitly provided, and add better target directory naming 2013-04-28 13:38:26 -06:00
Tianon Gravi 4b3354af3f Improve mkimage-debian script to also tag using the release version number of the final image (6.0.7, 7.0, etc.)
This is as discussed on #447.
2013-04-28 12:31:28 -06:00
Guillaume J. Charmes 9042535f5a Move the capabilities detection into a runtime method 2013-04-26 14:32:55 -07:00
Guillaume J. Charmes 8f81e175af Merge pull request #473 from dotcloud/26-auto_restart_containers-feature
+ runtime: Add -r flag to dockerd in order to restart previously running container....
2013-04-26 14:02:01 -07:00
Guillaume J. Charmes 636c7835d3 Merge pull request #467 from dotcloud/improve_localhost_port_test
* tests: Improve unit test to avoid unnecessary warnigns
2013-04-26 14:01:13 -07:00
Guillaume J. Charmes 6d1dd8b41a Merge pull request #478 from tianon/mkimage-debian
+ contrib: Add contrib/mkimage-debian.sh used to create the tianon/debian images
2013-04-26 13:51:47 -07:00
Guillaume J. Charmes ae97477284 Remove -command in CmdCommit and make -config use Json 2013-04-26 10:48:33 -07:00
Tianon Gravi 86ad98e72a Add contrib/mkimage-debian.sh used to create the tianon/debian images 2013-04-26 08:54:29 -06:00
Victor Vieux a48eb4dff8 run now try to pull if unknown image 2013-04-26 15:08:33 +02:00
Solomon Hykes 03d82922aa Merge pull request #474 from brianm/vmware_fusion_provider
Support for VMWare Fusion Provider in Vagrantfile
2013-04-26 01:31:11 -07:00
Guillaume J. Charmes 30d327d37e Add TestCommitAutoRun 2013-04-25 17:03:13 -07:00
Guillaume J. Charmes 724e2d6b0a Update unit test in order to comply with new api 2013-04-25 17:02:38 -07:00
Guillaume J. Charmes 51d6228261 Implement -config and -command in CmdCommit in order to allow autorun 2013-04-25 16:48:31 -07:00
Brian McCallister 4db680fda4 don't fight the box kernel version, not worth it 2013-04-25 06:29:13 -06:00
Brian McCallister 9c7293508d get aufs dependencies into vmware image 2013-04-25 06:09:04 -06:00
Brian McCallister 9d8743a7ae vmware fusion provider config 2013-04-25 05:59:31 -06:00
Guillaume J. Charmes 50144aeb42 Add -r flag to dockerd in order to restart previously running container. Fixes #26 2013-04-24 19:01:23 -07:00
Guillaume J. Charmes ee298d1420 Specify a different bridge for tests than for regular runtime 2013-04-24 17:43:41 -07:00
Solomon Hykes 03855b0027 Merge pull request #466 from dotcloud/441-vagrant-improve
* Packaging: simplify Vagrantfile
2013-04-24 17:25:20 -07:00
Daniel Mizyrycki 2726e3649a vagrant; issue #441: Improve main config including aws ubuntu lts dependency 2013-04-24 11:30:15 -07:00
Victor Vieux 75c0dc9526 fixed inspect 2013-04-24 18:50:26 +02:00
Victor Vieux c7bbe7ca79 added export 2013-04-24 16:32:51 +02:00
Victor Vieux 79512b2a80 added commit 2013-04-24 16:06:30 +02:00
Victor Vieux 1e357c6969 changed not found errors to 404, added inspect, wait and diff 2013-04-24 14:01:40 +02:00
Solomon Hykes 90668a8a99 Bumped version to 0.2.0 2013-04-23 23:15:09 -07:00
Solomon Hykes c7fd84b8a0 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-23 23:05:38 -07:00
Solomon Hykes 874a40ed3a - Dev: dockerbuilder requires a fake initctl because 'apt-get install devscripts' insists on installing a stupid daemon I never asked for in the first place. 2013-04-23 23:04:54 -07:00
Solomon Hykes 370fafacbf Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-23 22:57:50 -07:00
Solomon Hykes a0478f726d dockerbuilder: upload most recent Ubuntu package (note version FOO might not yet be packaged at tag vFOO) 2013-04-23 22:57:34 -07:00
Solomon Hykes e5bc5a2e31 Merge pull request #427 from dhrp/docs
- Packaging: Fixed Vagrantfile
* Documentation: Updated install instructions
2013-04-23 19:49:28 -07:00
Solomon Hykes 25fc3a7e76 Merge pull request #470 from dotcloud/packaging-ubuntu
* Packaging: Add 0.1.8 to Ubuntu packaging changelog
* Packaging: Update the Ubuntu maintainer manual
2013-04-23 19:46:56 -07:00
Solomon Hykes b3ab0b561e Makefile improvements
+ Convenience rules: srcrelease, deps
	- Separate dependency vendoring from building the binary
	  (re-download dependencies with 'make deps')
2013-04-23 19:41:38 -07:00
Solomon Hykes 8b8c8bf7cb Fix 'make release RELEASE_VERSION=master' 2013-04-23 18:50:53 -07:00
Solomon Hykes a8651a23b2 make release: build a binary release of the most recent version tag 2013-04-23 18:32:59 -07:00
Daniel Mizyrycki f744cfd5a7 packaging-ubuntu: update maintainer documentation for changelog file 2013-04-23 13:51:03 -07:00
Solomon Hykes e03b241fb1 dockerbuilder: build with 'make; cp -R ./bin' 2013-04-23 12:07:54 -07:00
Thatcher Peskens 1ddca1948b Fixed remaining issues and conflicts created by last merge. 2013-04-23 12:04:53 -07:00
Solomon Hykes 2485bb2cd2 dockerbuilder: use a pristine GOPATH, with the fresh checkout registered at the right path (for internal submodules) 2013-04-23 11:45:47 -07:00
Guillaume J. Charmes 6ebb249131 Remove unecessary memeory limit within tests 2013-04-23 11:25:16 -07:00
Guillaume J. Charmes c45beabcd5 Improve TestMultipleAttachRestart to avoid unnecessary warning 2013-04-23 11:22:30 -07:00
Guillaume J. Charmes a22c78523f Wait for the container to finish in TestAttachDisconnect before destroying it 2013-04-23 11:09:48 -07:00
Guillaume J. Charmes 5a02c9ba0a Make sure the container is well started prior to perform the test 2013-04-23 11:08:31 -07:00
Solomon Hykes 7577f48dc4 dockerbuilder: build in current directory instead /go and /tmp 2013-04-23 10:53:02 -07:00
Solomon Hykes 0512cf9c83 dockerbuilder: /usr/local/bin is already set by docker 2013-04-23 10:49:58 -07:00
Solomon Hykes 73da7a12e7 Increased timeout in TCP port allocation test to pass on slower machines 2013-04-23 10:12:46 -07:00
Victor Vieux cf19be44a8 added run (wip), fixed ps and images, added port and tag 2013-04-23 18:20:53 +02:00
Solomon Hykes 50f5723f1d Merge pull request #465 from shamrin/patch-2
- Documentation: fixed typo in "Building blocks"
2013-04-23 09:02:19 -07:00
Alexey Shamrin cbc4eccd50 fixed typo in buildingblocks.rst 2013-04-23 12:52:55 +04:00
Solomon Hykes cff26b3a6c Merge pull request #464 from tianon/patch-1
- Runtime: adapt cgroup capability detection to work on Gentoo
2013-04-23 00:36:10 -07:00
Solomon Hykes 329c3e0ffd Merge pull request #462 from dotcloud/initial_changelog
+ Add initial Changelog
2013-04-23 00:32:25 -07:00
Solomon Hykes 4f6cc5c733 Completed Changelog for all past versions 2013-04-23 00:30:18 -07:00
Tianon Gravi e413340723 Update FindCgroupMountpoint to be more forgiving
On Gentoo, the memory cgroup is mounted at /sys/fs/cgroup/memory, but the mount line looks like the following:
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)

(note that the first word on the line is "memory", not "cgroup", but the other essentials are there, namely the type of cgroup and the memory mount option)
2013-04-23 01:09:29 -06:00
Solomon Hykes 95e066d24f - Runtime: ghost containers can be killed. 2013-04-22 22:30:33 -07:00
Solomon Hykes 82b8f7a565 hack/dockerbuilder: a standard build environment for building and uploading official binary builds of docker... inside docker 2013-04-22 22:29:12 -07:00
Solomon Hykes 97badbd29e Bumped version to 0.1.8 2013-04-22 22:04:57 -07:00
Thatcher Peskens 5a5e417d46 Merge remote-tracking branch 'dotcloud/master' into dhrp/docs
Conflicts:
	docker/docker.go
	docs/sources/installation/archlinux.rst
	docs/sources/installation/index.rst
	docs/sources/installation/ubuntulinux.rst
	runtime.go
	utils.go
2013-04-22 18:44:50 -07:00
Thatcher Peskens 4031a01af1 Merged changes 2013-04-22 18:38:42 -07:00
Guillaume J. Charmes 0b0d958b88 Merge pull request #463 from dotcloud/improve_pid_file_feature
Check that the pid in pidfile exists before preventing docker to start
2013-04-22 18:24:03 -07:00
Guillaume J. Charmes 03e4704ae5 Merge pull request #442 from dotcloud/fix_deleted_file_diff
Use aufs to handle parents whiteouts instead of doing it manually
2013-04-22 18:23:46 -07:00
Guillaume J. Charmes 7a8ac76299 Merge pull request #456 from dotcloud/453-generic_kernel_detection-fix
453 generic kernel detection fix
2013-04-22 18:20:17 -07:00
Guillaume J. Charmes c05c91ca3b Make kernel detection work without suffix 2013-04-22 18:15:33 -07:00
Guillaume J. Charmes b76d63cb0c Forbid attach to ghost 2013-04-22 17:53:32 -07:00
Guillaume J. Charmes f926ed182f Allow to kill/stop ghosts 2013-04-22 17:53:32 -07:00
Guillaume J. Charmes d440782e17 Allow to kill container after docker server restarts 2013-04-22 17:52:38 -07:00
Guillaume J. Charmes 82848d4158 Allow to wait on container even after docker server restarts using lxc-info 2013-04-22 17:52:38 -07:00
Guillaume J. Charmes 97535e5a64 Add unit test for file deletion 2013-04-22 17:51:09 -07:00
Guillaume J. Charmes f079fbe3fa Check that the pid in pidfile exists before preventing docker to start 2013-04-22 15:57:31 -07:00
Guillaume J. Charmes 90d144b612 Merge pull request #457 from shamrin/patch-1
README.md: `docker port` instead of just `port`
2013-04-22 15:40:03 -07:00
Guillaume J. Charmes d3db94696d Merge pull request #461 from neomantra/master
Fix typo (ghot -> ghost)
2013-04-22 15:39:34 -07:00
Evan Wies ffe16e3224 Fix typo (ghot -> ghost) 2013-04-22 18:37:06 -04:00
Guillaume J. Charmes 0b60829df7 Add initial changelog 2013-04-22 15:26:06 -07:00
Victor Vieux 6ce475dbdf added push hijack (wip) 2013-04-22 23:37:22 +02:00
Thatcher Peskens 690e118670 Updated gettingstarted with quicker install. 2013-04-22 13:36:00 -07:00
Alexey Shamrin 038e1d174b README.md: docker port instead of just port 2013-04-23 00:27:23 +04:00
Thatcher Peskens 6c8dcd5cbb Updated Vagrantfile and documentation to reflect new installation path using Ubuntu's PPA, also switched everything to use Ubuntu 12.04 by default. 2013-04-22 13:10:32 -07:00
Guillaume J. Charmes 16aeb77d51 Move the kernel detection to arch specific files 2013-04-22 12:08:59 -07:00
Guillaume J. Charmes 4ac3b803b9 Make the kernel version detection more generic 2013-04-22 11:39:56 -07:00
Guillaume J. Charmes 3514e47edc Do not prevent docker from running when kernel detection fails 2013-04-22 11:26:34 -07:00
Guillaume J. Charmes acb546cd1b Fix race within TestRunDisconnectTty 2013-04-22 11:16:32 -07:00
Victor Vieux 1aa7f1392d restify api 2013-04-22 18:17:47 +02:00
Guillaume J. Charmes 2ced94b414 Merge pull request #454 from tianon/master
Update utils.go to not enforce extra constraints on the kernel "flavor" (such as being integral or even comparable one to another)
2013-04-22 08:02:42 -07:00
Guillaume J. Charmes 71b5806614 Do not stop execution if cgroup mountpoint is not found 2013-04-22 00:44:57 -04:00
Tianon Gravi 1f65c6bf4c Update utils.go to not enforce extra constraints on the kernel "flavor" (such as being integral or even comparable one to another)
This is especially to fix the current docker on kernels such as gentoo-sources, where the "flavor" is the string "gentoo", and that obviously fails to be converted to an integer.
2013-04-21 19:19:38 -06:00
Solomon Hykes 965e8a02d2 'docker push' shows an additional progress bar while it buffers the archive to disk. Fixes #451. 2013-04-21 15:29:26 -07:00
Solomon Hykes baacae8345 'docker push' buffers filesystem archives on disk instead of memory. 2013-04-21 14:23:55 -07:00
Solomon Hykes 52cedb8a05 Better title in ubuntu install doc 2013-04-20 18:26:15 -07:00
Solomon Hykes 15c7e72e2a Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-20 18:19:04 -07:00
Solomon Hykes 76b40ad6c9 Merge remote-tracking branch 'origin/check_kernel_capabilities' 2013-04-20 17:40:25 -07:00
Solomon Hykes 6909f3911f Merge pull request #422 from shawnsi/arch-docs
Arch docs
2013-04-20 17:35:43 -07:00
Solomon Hykes 3b6c540fe8 Bumped version to 0.1.7 2013-04-20 17:35:00 -07:00
Solomon Hykes d49a273071 Moved 'under the hood' below install instructions and examples in README 2013-04-20 17:33:02 -07:00
Solomon Hykes 1201c418cd Fix Ubuntu install doc 2013-04-20 17:31:49 -07:00
Solomon Hykes 4a9c3a92e1 Formatting fix in ubuntu install doc 2013-04-20 17:30:33 -07:00
Solomon Hykes 28831a412f Link to public images list in the README 2013-04-20 17:29:41 -07:00
Solomon Hykes 70cf467fdf Removed duplicate ubuntu binary install instructions from README 2013-04-20 17:29:12 -07:00
Solomon Hykes c40f01319f Cleaned up install instructions in the README
* Addded quick install on ubuntu as the 1st install option
	* Grouped other binary installs under "binary installs"
	* Removed duplicate binary ubuntu installs (linked to the docs)
	* Improved "build from source" instructions
2013-04-20 17:26:50 -07:00
Thatcher Peskens 0731d1a582 Updated ubuntu install 2013-04-19 20:59:43 -07:00
Thatcher Peskens 8ecde8f9a5 Updated documentation and fixed Vagrantfile 2013-04-19 20:57:50 -07:00
Solomon Hykes 911925b54a Add a test for allocating tcp ports and reaching them on localhost 2013-04-19 20:46:07 -07:00
Solomon Hykes 7f1a32b9ff Shutdown loopback-to-loopback proxy when unmapping a port 2013-04-19 20:44:25 -07:00
Solomon Hykes 930e9a7e43 Emulate DNAT in userland for loopback-to-loopback connections. This makes container ports available from localhost. 2013-04-19 19:35:44 -07:00
Solomon Hykes 61259ab4b4 Exclude loopback-to-loopback connections from DNAT rules, to allow userland proxying 2013-04-19 19:32:32 -07:00
Solomon Hykes 931ca464a7 'docker ps' shows port mappings 2013-04-19 19:29:13 -07:00
Guillaume J. Charmes cc5a044a8c update TestRunDisconnectTty to reflect the correct behavior of CmdRun 2013-04-19 17:51:41 -07:00
Guillaume J. Charmes 0eb425426f Merge pull request #444 from lopter/master
Fixe the race condition between docker run and docker logs from #428
2013-04-19 18:09:58 -07:00
Guillaume J. Charmes 3bfb70db24 Wait for the container terminate at the end of CmdRun
Fixes the race condition between docker run and docker logs from #428.
2013-04-19 18:06:13 -07:00
Guillaume J. Charmes e49af5b6de Use aufs to handle parents whitouts instead of doing it manually 2013-04-19 16:33:25 -07:00
Solomon Hykes d8416539b3 contrib/vagrant-docker: a placeholder to centralize collaboration on an official docker provider for vagrant 2013-04-19 15:55:34 -07:00
Solomon Hykes a76c3a9c95 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-19 12:55:32 -07:00
Solomon Hykes e81ddb2dc7 Fixed 'hack' rule in Makefile 2013-04-19 12:55:17 -07:00
Solomon Hykes 4d728821e3 Merge remote-tracking branch 'origin/buildbot' 2013-04-19 12:47:22 -07:00
Guillaume J. Charmes e92c4b1f39 Merge pull request #415 from dotcloud/261-choose_grace_period-feature
added -t in docker stop and restart to choose grace period
2013-04-19 12:42:34 -07:00
Solomon Hykes 152a9f77b4 Fix ubuntu packaging to build from a clean checkout of the correct git tag 2013-04-19 12:39:40 -07:00
Solomon Hykes bfb84b564c Merge remote-tracking branch 'origin/30-packaging-ubuntu' 2013-04-19 11:31:53 -07:00
Victor Vieux b295239de2 added: info, history, logs, ps, start, stop, restart, rm, rmi 2013-04-19 15:24:37 +02:00
Solomon Hykes e8a67f632e Cleanup examples on README 2013-04-18 22:37:45 -07:00
Solomon Hykes 3d2fd8a650 Small wording fix in README 2013-04-18 22:24:52 -07:00
Solomon Hykes 79a78d37e7 Add examples to the README 2013-04-18 22:24:29 -07:00
Solomon Hykes 3ae5c45d9a Fix examples in README to no longer rely on standalone mode 2013-04-18 22:22:00 -07:00
Guillaume J. Charmes f3e89fae28 Use mount to determine the cgroup mountpoint 2013-04-18 21:57:58 -07:00
Guillaume J. Charmes c42a4179fc Add unit tests for CompareKernelVersion 2013-04-18 21:34:34 -07:00
Guillaume J. Charmes 2d32ac8cff Improve the docker version output 2013-04-18 21:08:33 -07:00
Guillaume J. Charmes f68d107a13 Remove the NO_MEMORY_LIMIT constant 2013-04-18 21:08:20 -07:00
Guillaume J. Charmes 640efc2ed2 Add capabilities check to allow docker to run on kernel that does not have all options 2013-04-18 20:55:41 -07:00
Guillaume J. Charmes 003622c8b6 Check kernel version and display warning if too low 2013-04-18 20:47:24 -07:00
Thatcher Peskens 6de5ca1e64 Added redirect from old location of documentation (/documentation), these was the location when we were on github. 2013-04-18 16:00:18 -07:00
Solomon Hykes deb55e416e contrib/docker-build: don't remove the base image if the first build step fails 2013-04-18 14:46:17 -07:00
Victor Vieux 79e9105806 added kill and images(wip) 2013-04-18 18:56:22 +02:00
Shawn Siefkas 7eda9c64b8 Updating the arch linux installation docs
New AUR package name
Adding systemd service unit info
2013-04-18 09:20:23 -05:00
Shawn Siefkas 84c13a3dcf Adding archlinux packaging documentation 2013-04-18 09:17:31 -05:00
Victor Vieux 90602ab62a fixed test 2013-04-18 16:03:50 +02:00
Daniel Mizyrycki 8e6ba343bf packaging-ubuntu, issue #30: Ensure docker package installs and passes tests on official vagrant Ubuntu 12.04 box 2013-04-17 21:10:53 -07:00
Daniel Mizyrycki 523cd8e29c packaging-ubuntu, issue #30: streamline building and uploading to PPA 2013-04-17 20:56:34 -07:00
Daniel Mizyrycki fd39af7f85 packaging-ubuntu: move original files in place for update 2013-04-17 20:56:34 -07:00
Solomon Hykes ee82870ff7 Bumped version to 0.1.6 to mark image format change (author field) 2013-04-17 20:18:35 -07:00
Solomon Hykes 227a8142a3 Record the author of an image with 'docker commit -author' 2013-04-17 20:13:11 -07:00
Solomon Hykes 4ef2d5c1e6 Added 'author' field to the image format 2013-04-17 19:58:17 -07:00
Victor Vieux c0d5d5969b skeleton remote API, only version working (wip) 2013-04-18 03:13:43 +02:00
Solomon Hykes e34e44e8e6 Bumped version to 0.1.5 2013-04-17 17:12:08 -07:00
Solomon Hykes 13d9e26edd Fix the behavior of Graph.Register so that it can be interrupted without side effect 2013-04-17 16:35:22 -07:00
Solomon Hykes 0a3131554c Merge pull request #406 from shawnsi/405-arch-docs
Issue #405: Documentation for Arch Linux Install
2013-04-17 15:45:26 -07:00
Solomon Hykes 521ce07859 Merge pull request #409 from lynaghk/master
Docker init created by contrib setup script should set proper UTF8 LANG
2013-04-17 15:23:12 -07:00
Solomon Hykes f02950965e Merge remote-tracking branch 'origin/183-no_such_device-fix' 2013-04-17 11:54:57 -07:00
Solomon Hykes 16f6daa5be Merge remote-tracking branch 'origin/416-lxc_0_9_compatibliity-fix' 2013-04-17 11:35:12 -07:00
Solomon Hykes ca6cd5b557 Keep a cache of the unit-tests image. So I can code in conferences with crappy wifi. 2013-04-17 11:32:13 -07:00
Victor Vieux 92cd75607b Merge branch 'remote-api' of https://github.com/dotcloud/docker into remote-api 2013-04-17 12:21:56 +02:00
Victor Vieux 1615bb08c7 added -t in docker stop and restart to choose grace period 2013-04-17 11:56:30 +02:00
Guillaume J. Charmes c4cd224d90 improve the crashTest script 2013-04-16 15:20:04 -07:00
Guillaume J. Charmes 7b0e96f1f4 Manually pass the env to docker-init instead of relying on lxc to pass it 2013-04-16 14:32:50 -07:00
Solomon Hykes fc72a809c1 Remove unneeded dependencies from README 2013-04-16 12:10:16 -07:00
Solomon Hykes a11b31399b Skeleton of http API 2013-04-16 19:53:08 +02:00
Solomon Hykes 2a47df0202 Disabled standalone mode (fixes #364) 2013-04-15 11:44:11 -07:00
Kevin J. Lynagh 468fb90117 install.sh script's dockerd.conf should set docker daemon environment's LANG to en_US.UTF-8. See #355. 2013-04-15 08:49:48 -07:00
Victor Vieux ac49a797b4 try to load aufs module, disply error on failure 2013-04-15 12:05:46 +02:00
Guillaume J. Charmes 1ec6c223c9 Add a script to help reproduce #407 2013-04-14 15:13:32 -07:00
Solomon Hykes db08705e3c Merge remote-tracking branch 'origin/packaging' 2013-04-13 21:40:53 -07:00
Solomon Hykes fdf3308260 Merge remote-tracking branch 'origin/396-disabling_memory_limit-feature' 2013-04-13 21:25:53 -07:00
Guillaume J. Charmes c2c72bcfd7 Add \r to error message in run raw mode 2013-04-13 15:03:24 -07:00
Solomon Hykes cdf90bb04b Merge remote-tracking branch 'origin/96-dns_issue-fix' 2013-04-12 17:50:59 -07:00
Shawn Siefkas 45809e9a05 Issue #405: Documentation for Arch Linux Install 2013-04-12 13:25:33 -05:00
Guillaume J. Charmes 1967c8342a Allow to disable memory limit at compilation time 2013-04-12 10:48:20 -07:00
Guillaume J. Charmes 7673afc843 Allow use to set his own dns via -dns 2013-04-12 10:43:13 -07:00
Solomon Hykes b1fbebb4a3 Fixed wording of ghost-related messages 2013-04-12 10:39:08 -07:00
Solomon Hykes 3527291b47 Merge remote-tracking branch 'origin/ghost_handling-fix' 2013-04-12 10:33:36 -07:00
Solomon Hykes 57d31c9777 Merge remote-tracking branch 'origin/kill_behaviour_fix' 2013-04-12 10:20:26 -07:00
Guillaume J. Charmes a2f5a56143 Merge pull request #403 from titanous/update-authors
Update AUTHORS
2013-04-12 07:56:19 -07:00
Jonathan Rudenberg 343ed6b53f Update AUTHORS 2013-04-12 10:44:50 -04:00
Guillaume J. Charmes 22893429ed Go fmt 2013-04-12 07:37:24 -07:00
Guillaume J. Charmes c1703c2b68 Merge branch 'create_pidfile' of https://github.com/flavio/docker into flavio-create_pidfile 2013-04-12 07:28:36 -07:00
Guillaume J. Charmes a8c15477d9 Merge pull request #381 from dotcloud/371-add-l-ps
Add options to docker ps
2013-04-12 07:16:00 -07:00
Guillaume J. Charmes 9d03b2bb62 Merge pull request #395 from dotcloud/commands_usage-fix
fixes some usages (multiple parameters mostly)
2013-04-12 07:03:36 -07:00
Victor Vieux 8987bd5832 removed not needed [OPTIONS] and remove poor messages like 'Not enough arguments' 2013-04-12 12:26:31 +02:00
Daniel Mizyrycki f226842aa1 Packaging, Debian: Add maintainer documentation 2013-04-11 20:17:41 -07:00
Daniel Mizyrycki b14164879b Packaging: Add README documentation 2013-04-11 17:39:47 -07:00
Guillaume J. Charmes bb22cd492e Add unit test for hanging kill + fix other tests behaviour 2013-04-11 16:21:19 -07:00
Solomon Hykes 27be5aec74 Merge pull request #386 from lopter/master
Use ip to setup the gateway in sysinit.go
2013-04-11 15:02:20 -07:00
Solomon Hykes 048f9f4974 Added docker-build (formerly github.com/shykes/changer) as a contrib script 2013-04-11 14:44:39 -07:00
Flavio Castelli fb0b375be7 docker daemon: create file containing PID
Ensure the docker daemon creates a file containing its PID under
/var/run/docker.pid.

The daemon takes care of removing the pid file when it receives either
SIGTERM, SIGINT or SIGKILL.

The daemon also refuses to start when the pidfile is found. An
explanation message is shown to the user when this happens.

This change is required to make docker easier to manage by tools like
checkproc which rely on this information.
2013-04-11 21:41:08 +02:00
Solomon Hykes 79d934bfb0 Simplify the output of 'docker images' by removing the PARENT column 2013-04-11 12:11:41 -07:00
Solomon Hykes 54dfedc516 Merge remote-tracking branch 'origin/148-remove_repositories-feature' 2013-04-11 11:36:28 -07:00
Solomon Hykes 0eb7157b6f Merge remote-tracking branch 'origin/crlf_on_raw_mode' 2013-04-11 11:31:17 -07:00
Solomon Hykes 2de953490d Contrib post-commit hook for checking gofmt 2013-04-11 11:30:35 -07:00
Victor Vieux 3ba44d2d5f fixes some usages 2013-04-11 18:46:47 +02:00
Guillaume J. Charmes 313d13ea01 Detect and mark ghost container. 2013-04-11 09:26:17 -07:00
Guillaume J. Charmes e68c04b722 force kill now use lxc-kill. Fixes #383 2013-04-11 09:04:04 -07:00
Guillaume J. Charmes c902c43766 Merge pull request #392 from dotcloud/rm_usage-fix
Display usage when no parameter in docker rm
2013-04-11 07:56:46 -07:00
Victor Vieux c105049f7e display usage when no parameter 2013-04-11 16:27:01 +02:00
Victor Vieux 17136d58f2 snake_case to camelCase 2013-04-11 13:09:40 +02:00
Daniel Mizyrycki 8ea1e9126f packaging; issue #251: Add debian packaging 2013-04-10 21:00:39 -07:00
Solomon Hykes 38e2d00199 Skeleton of http API 2013-04-10 19:48:21 -07:00
Guillaume J. Charmes 6dc4c74b5a Use crlf in registry function to avoid issue with autlogin in push and autopull in run 2013-04-10 19:13:15 -07:00
Guillaume J. Charmes 9d1fd2317d use crlf in login in order to avoir issue due to real raw mode 2013-04-10 19:08:46 -07:00
Guillaume J. Charmes 1f9f5eed5d Put the resolv.conf path in a variable instead of being hardcoded within lxc 2013-04-10 18:23:34 -07:00
Louis Opter 5e1a975b48 Use ip to setup the gateway in sysinit.go
ip from iproute2 replaces the legacy route tool which is often not
installed by default on recent Linux distributions.

The same patch has been done in network.go and is re-used here.
2013-04-10 17:40:28 -07:00
Guillaume J. Charmes 97f48e59fc Allow rmi to remove image from its name 2013-04-10 17:23:42 -07:00
Solomon Hykes e41fd24542 Added temporary spec for data volumes as requested on #111 2013-04-10 13:57:26 -07:00
Victor Vieux 8bd192fb16 changed last to n 2013-04-10 21:09:21 +02:00
Daniel Mizyrycki d2c1850fb5 testing: Make postcommit more generic 2013-04-10 11:32:48 -07:00
Victor Vieux 8c3331dc97 add -l to docker ps 2013-04-10 19:30:57 +02:00
Solomon Hykes f507188ddc Merge pull request #372 from srid/goroutine-scope
serve goroutine must refer to the local conn
2013-04-09 21:06:31 -07:00
Solomon Hykes 76b7b2adf7 Merge remote-tracking branch 'origin/wait_non_existing_container-fix' 2013-04-09 21:05:15 -07:00
Solomon Hykes cb68662b9b Merge pull request #377 from jbarbier/buildbot
Fix the Makefile, rule=hack to make it work on Windows
2013-04-09 20:53:29 -07:00
Julien Barbier b7cda3288e Fix the Makefile, rule=hack to make it work on Windows 2013-04-09 19:07:50 -07:00
Solomon Hykes a1f54cad6c Merge pull request #367 from johncosta/333-redis-documentation
Add documentation for running a redis process with docker
2013-04-09 18:16:39 -07:00
Guillaume J. Charmes 9f83b9df22 Make sure all containers (even previously stopped) get a correct wait lock 2013-04-09 17:40:02 -07:00
John Costa 4ab241c930 incorporate feedback for improving the PR 2013-04-09 18:04:01 -04:00
Sridhar Ratnakumar f731835e45 serve goroutine must refer to the local conn 2013-04-09 15:00:05 -07:00
Daniel Mizyrycki bbaa975ec8 testing: Add buildbot VM 2013-04-09 14:37:37 -07:00
John Costa 418ef43fbb Merge github.com:dotcloud/docker into 333-redis-documentation 2013-04-09 16:07:40 -04:00
Solomon Hykes 40ebe78bb1 Bumped version to 0.1.4 2013-04-09 13:00:50 -07:00
Solomon Hykes 1b7115a337 Merge remote-tracking branch 'origin/disable_signals-create_escape_sequence' 2013-04-09 12:56:32 -07:00
Guillaume J. Charmes 2e6a5bc7ee Update README with escape sequence 2013-04-09 12:55:26 -07:00
Guillaume J. Charmes 72cef46e5e Fix merge issue 2013-04-09 12:55:26 -07:00
Guillaume J. Charmes 626bfd87a7 Use integers instead of non-printable chars in the escape sequence detection 2013-04-09 12:55:26 -07:00
Guillaume J. Charmes 8f41f1fa60 Remove unused optimization that could lead in loosing the escape sequence 2013-04-09 12:55:26 -07:00
Guillaume J. Charmes faa8843650 Look for the escape sequence only in tty mode 2013-04-09 12:55:17 -07:00
Guillaume J. Charmes 0d9e54367f Fix deadlock on stop failure 2013-04-09 12:06:01 -07:00
Guillaume J. Charmes 1f70b1e15d Implement an escape sequence in order to be able to detach from a container 2013-04-09 11:06:17 -07:00
Guillaume J. Charmes 3f63b87807 Disable signal catching and enable real posix raw mode 2013-04-09 11:06:17 -07:00
Solomon Hykes 9c3d2b6a4e Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-09 11:02:43 -07:00
Solomon Hykes 1716fccbcc Merge remote-tracking branch 'origin/change_run_detach_behavious_tty_mode' 2013-04-09 10:39:13 -07:00
Solomon Hykes 9043e4c757 Merge pull request #363 from dhrp/docs
Added code and color for 'note' and updated the examples note.
2013-04-09 10:36:44 -07:00
Solomon Hykes 2e9a73c5d8 Merge remote-tracking branch 'origin/fix_flush_behaviour' 2013-04-09 10:31:56 -07:00
Guillaume J. Charmes 1eaaa6b744 Flush stdout on import to avoid deadklock when waiting for stdin (import -). Fixed #365 2013-04-09 10:02:57 -07:00
Guillaume J. Charmes cb54e9c659 Flush whether or not there we set the rawmode to avoid the client to lock 2013-04-09 09:59:30 -07:00
Guillaume J. Charmes 7c2b085d1a Add inconditionnal lock in Start/Stop/Kill to avoid races 2013-04-09 09:09:54 -07:00
Guillaume J. Charmes d063d52cce Update the unit test to reflect the new CmdRun behaviour in tty mode 2013-04-09 08:18:36 -07:00
Guillaume J. Charmes 64c1b6d9cd Change the behaviour of CmdRun in tty mode: dont kill the process uppon detach 2013-04-09 08:18:16 -07:00
John Costa 8f15c423e6 add documentation for running a redis process with docker 2013-04-09 11:04:14 -04:00
Guillaume J. Charmes 329f4449dc Remove the mutexes and use chan instead in order to handle the wait lock 2013-04-09 07:57:59 -07:00
Solomon Hykes 0767916ade Merge pull request #346 from srid/patch-2
make the service example work
2013-04-08 22:12:34 -07:00
Solomon Hykes 10923c7890 Merge remote-tracking branch 'origin/pty_fix-1' 2013-04-08 21:12:22 -07:00
Thatcher Peskens 2832ea0cfe Added code and color for 'note' and updated the hello world note. 2013-04-08 20:10:47 -07:00
Solomon Hykes a7299a3f26 Merge remote-tracking branch 'origin/unit_test_improvment-2' 2013-04-08 18:29:12 -07:00
Solomon Hykes 1601366cb6 Make it more clear when Docker fails to allocate a free IP range for its bridge 2013-04-08 18:16:58 -07:00
Louis Opter e9a68801ba Update the tests according to the "optional raw mode" changes 2013-04-08 16:07:12 -07:00
Guillaume J. Charmes f73401fb9a Add missing file 2013-04-08 16:07:12 -07:00
Guillaume J. Charmes dcf4572a69 Set the raw mode only for tty enabled containers 2013-04-08 16:07:12 -07:00
Guillaume J. Charmes d530d581f7 Make commands.go more idiomatic. Use DockerConn only when needed, keep io.Writer when not 2013-04-08 15:58:09 -07:00
Guillaume J. Charmes bdf05d8368 Reenable CmdRunAttachStdin and CmdRunHostname now using the DockConn interface 2013-04-08 15:58:09 -07:00
Guillaume J. Charmes b71b226cc1 Improve error management (avoid unwanted output in tests) 2013-04-08 15:58:09 -07:00
Guillaume J. Charmes 80f6b4587b Edit the tests for them to use the new command API. Disable TestRunHostname and TestAttachStdin. 2013-04-08 15:58:09 -07:00
Guillaume J. Charmes e6e9c1cd62 Use io.WriteCloser instead of *os.File in DockerLocalConn so we can use it with standard writers and pipes 2013-04-08 15:58:09 -07:00
Guillaume J. Charmes 246eed52de Move DockerLocalConn and terminal functions form package "main" to "rcli" in order to be able to use DockerLocalConn in commands_test.go 2013-04-08 15:58:09 -07:00
Louis Opter b306a60738 Simplification in the goroutine that restore the terminal state on SIGINT 2013-04-08 15:58:09 -07:00
Louis Opter 7d0ab3858e Only set the terminal in raw mode for commands which need it
The raw mode is actually only needed when you attach to a container.
Having it enabled all the time can be a pain, e.g: if docker crashes
your terminal will end up in a broken state.

Since we are currently missing a real API for the docker daemon to
negotiate this kind of options, this changeset actually enable the raw
mode on the login (because it outputs a password), run and attach
commands.

This "optional raw mode" is implemented by passing a more complicated
interface than io.Writer as the stdout argument of each command. This
interface (DockerConn) exposes a method which allows the command to set
the terminal in raw mode or not.

Finally, the code added by this changeset will be deprecated by a real
API for the docker daemon.
2013-04-08 15:58:09 -07:00
Louis Opter 4e5001b46a Remove the unused http transport from rcli 2013-04-08 15:58:09 -07:00
Solomon Hykes b8f9803459 Merge pull request #347 from kencochrane/303_docs_fix
improved the example docs to help #303
2013-04-08 11:50:07 -07:00
Solomon Hykes 0c018d3697 Merge pull request #356 from flavio/improve_python_web_app_example
Extend the documentation covering the web app example
2013-04-08 11:49:17 -07:00
Flavio Castelli 72fdb41069 Extend the documentation covering the web app example
Make it clear how to access the web app running inside of the container
from the host.
2013-04-08 17:39:30 +02:00
Ken Cochrane 6eb8a74ff9 added headers to examples linking back to running the examples page 2013-04-07 10:23:00 -04:00
Ken Cochrane 81ebf4fcf6 made a new running the examples page, and added a link to the top of each example to the page to show people how to run them. 2013-04-07 10:21:08 -04:00
Sridhar Ratnakumar 9875a9b1f1 sync with README 2013-04-07 00:43:57 -07:00
Sridhar Ratnakumar 27feba4594 make the service example work
issue #98 requires connecting to localhost (which `hostname` may resolve to) will not work.
2013-04-07 00:41:24 -07:00
Guillaume J. Charmes c83393a541 Move the DockerConn flush to its own function 2013-04-05 20:08:31 -07:00
Guillaume J. Charmes 7e1e7d14fa Make sure to flush buffer when setting raw mode 2013-04-05 19:48:49 -07:00
Guillaume J. Charmes 99b5bec069 Fix run disconnect behavious in tty mode + add unit test to enforce it 2013-04-05 19:02:35 -07:00
Guillaume J. Charmes 7d8895545e Cleanup pty variable names 2013-04-05 17:40:55 -07:00
Guillaume J. Charmes 33a5fe3bd4 Make sure the process start in his own session and grabs the terminal 2013-04-05 17:40:55 -07:00
Guillaume J. Charmes 847a8f45a4 Merge the 3 ptys in 1 2013-04-05 17:40:55 -07:00
Solomon Hykes 8cf30395a1 Changed default bridge interface do 'docker0' 2013-04-05 14:16:19 -07:00
Solomon Hykes 22adb52c0a The flag to use a pre-existing bridge interface is '-b'. Added explanation 2013-04-05 14:16:04 -07:00
Solomon Hykes 793c1ad990 Merge remote-tracking branch 'origin/219-default-bridge-2' 2013-04-05 14:02:16 -07:00
Solomon Hykes febaeebfb8 Add tests of tcp port allocator 2013-04-05 13:03:24 -07:00
Solomon Hykes d32f184696 Fix a race condition when running the port allocator 2013-04-05 13:03:04 -07:00
Guillaume J. Charmes 20085794f0 Increase the timeout in TestStart() to make sure the container has the time to die within the function 2013-04-05 02:01:38 -07:00
Solomon Hykes a4fc52305a Bumping version to 0.1.3 2013-04-04 23:05:03 -07:00
Solomon Hykes 2aad4a3478 Choose which TCP frontend port to allocate with '-p :PORT' 2013-04-04 22:58:01 -07:00
Solomon Hykes a5fb1d6c01 Refactored PortAllocator to allow for same-frontend constraint 2013-04-04 22:56:12 -07:00
Guillaume J. Charmes b76b329ef0 Prevent destroy() to stop twice container in TestRestore() 2013-04-04 20:40:42 -07:00
Guillaume J. Charmes bae6f95830 Increase the timeout of TestRestore() to avoid unwanted timeout error 2013-04-04 20:32:44 -07:00
Guillaume J. Charmes cda9cf1539 Avoid unwanted warnings from destroy() in TestStart() 2013-04-04 20:30:24 -07:00
Solomon Hykes f344212b93 Renamed PortAllocator.populate() to run() 2013-04-04 19:49:32 -07:00
Solomon Hykes 0424998f38 Print a less confusing error message when lxcbr0 doesn't exist 2013-04-04 19:14:10 -07:00
Solomon Hykes 8bfbdd7afa Add versioning to docker image format. IMPORTANT: the format versioning is pegged to docker's versioning, so changes to the format MUST trigger an increment in version number. 2013-04-04 18:38:43 -07:00
Solomon Hykes 3de51b7bfe Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-04 17:00:59 -07:00
Solomon Hykes a58cd8c616 Merge pull request #322 from sa2ajj/port-map-nitpick
change option description to reflect the semantics
2013-04-04 16:39:54 -07:00
Solomon Hykes 586a79cca0 Merge remote-tracking branch 'dominikh/minor-code-touchups' 2013-04-04 16:20:37 -07:00
Solomon Hykes 349edf1bea Merge pull request #331 from lynaghk/master
Fix broken link on documentation website between examples.
2013-04-04 16:18:27 -07:00
Solomon Hykes 677908910c Merge pull request #320 from sa2ajj/cli-docs
move each command description into a separate document
2013-04-04 16:17:53 -07:00
Solomon Hykes 6b5fe8c2ec Merge remote-tracking branch 'origin/257-container_real_running_state-fix' 2013-04-04 15:34:18 -07:00
Solomon Hykes 26088a72b3 Merge remote-tracking branch 'dominikh/improve-attachopts' 2013-04-04 15:18:41 -07:00
Solomon Hykes ebc837957f Continue cleaning up iptables rules from previous version, to avoid crashing after an upgrade 2013-04-04 15:16:42 -07:00
Solomon Hykes c4d3da5871 Merge remote-tracking branch 'unclejack/137-fix-nat' 2013-04-04 15:06:20 -07:00
unclejack 32f5811476 stop looping remote:port from host to containers 2013-04-04 23:07:10 +03:00
Solomon Hykes a7f191d51d Merge remote-tracking branch 'origin/328-i_o_error_uncloced_connection-fix' 2013-04-04 11:03:39 -07:00
Guillaume J. Charmes 1b370f9d8d Move the default bridge name to a constant 2013-04-04 05:33:28 -07:00
Kevin J. Lynagh 92186d7cf7 Fix broken link in doc site.
Broken link was from python_web_app to nonexistent "base commands page"; updated to point to next item in examples menu, running_ssh_service screencast.
2013-04-03 22:23:17 -07:00
Solomon Hykes 5d3c0767da Simplified Graph.Delete() - no more garbage collecting, just atomic deregister then os.RemoveAll 2013-04-03 22:14:28 -07:00
Guillaume J. Charmes aa4bf4284b If bridge does not exists, try to create it 2013-04-03 16:17:03 -07:00
Guillaume J. Charmes d9a9bfc9c7 Make LXC aware of custom bridge 2013-04-03 16:15:44 -07:00
Guillaume J. Charmes 90a6e310fe Add an helper function to check if two network overlaps. Also add unit tests for this function 2013-04-03 16:15:43 -07:00
Guillaume J. Charmes f39af7e05d Put the bridge interface name in the command line 2013-04-03 16:15:43 -07:00
Solomon Hykes dce5a06aba Bumped version to 0.1.2 2013-04-03 15:35:32 -07:00
unclejack 3b65be9127 Fix NAT problem with ports looping back to containers 2013-04-04 01:32:46 +03:00
shin- ad0183e419 Check WaitTimeout return in test, replaced lock initialization in runtime.Register() with call to initLock() 2013-04-03 10:48:02 -07:00
Dominik Honnef 4f36039e7b clean up AttachOpts type
Primarily, there is no reason to have a pointer to a map. Furthermore,
make() can be used on AttachOpts directly.
2013-04-03 16:06:35 +02:00
Mikhail Sobolev b74d1c9247 change option description to reflect the semantics
At least, for me, 'map' means that there are two values and one is "mapped" to
another.

In this case, just one value is provided (container's port), the other value is
automatically obtained (host's port) and the actual mapping can be seen using
``docker port`` command.
2013-04-03 16:37:56 +03:00
Mikhail Sobolev cf8b8c1969 move each command description into a separate document 2013-04-03 15:55:18 +03:00
shin- d1767bbf67 Moved resetLock() to the Load() method ; changed resetLock() to initLock() and changed behavior to not modify the lock if it was already set (not nil) 2013-04-03 05:39:39 -07:00
shin- 7b74b9cab5 Integrated @creack's feedback on TestRestore 2013-04-03 05:37:45 -07:00
Dominik Honnef 14d3880daf remove superfluous panic 2013-04-03 11:19:48 +02:00
Dominik Honnef 22f1cc955d replace unreachable returns with panics
Not only is this a more common idiom, it'll make finding bugs easier,
and it'll make porting to Go 1.1 easier.

Go 1.1 will not require the final return or panic because it has a
notion of terminating statements.
2013-04-03 11:18:23 +02:00
Dominik Honnef cab31fd512 use wg.Done() isntead of wg.Add(-1) 2013-04-03 11:11:34 +02:00
Dominik Honnef 1fc55c2bb9 kill the right containers in runtime_test 2013-04-03 11:11:06 +02:00
Dominik Honnef 5ecd940a59 remove dead code in CmdPush 2013-04-03 11:08:32 +02:00
Dominik Honnef 3b8c2417fb use fmt.Fprintf instead of fmt.Fprint
fmt.Fprint does not allow format strings
2013-04-03 11:04:33 +02:00
Solomon Hykes 15c3096e89 Merged attachStdin 2013-04-02 20:46:32 -07:00
Solomon Hykes 22d1622926 Merge remote-tracking branch 'robryk/writebroadcaster-stuff' 2013-04-02 20:35:13 -07:00
Solomon Hykes 35c68944c7 Merged shawnsi/git-version 2013-04-02 20:26:22 -07:00
Solomon Hykes b1fa26bb76 TestRunHostname checks that 'docker run -h' correctly sets a custom hostname 2013-04-02 19:00:05 -07:00
Solomon Hykes d6fb2a0836 Merge remote-tracking branch 'sa2ajj/hostname-parameter' 2013-04-02 18:41:14 -07:00
Solomon Hykes 65aa3dda85 Merged dhrp/docs 2013-04-02 18:39:39 -07:00
Solomon Hykes a05af3ebf3 Fix a bug which caused 'docker push' to fail with 411-lenght-required in Go 1.0 2013-04-02 18:37:29 -07:00
Solomon Hykes 0e1781af26 Merge remote-tracking branch 'unclejack/194-high-image-compression' 2013-04-02 18:10:07 -07:00
Solomon Hykes 14d9f51bbe Merge branch 'master' into attach-stdin 2013-04-02 18:07:45 -07:00
Solomon Hykes c04af2a330 docker run [-a [stdin|stdout|stderr] [...]]: choose which streams to attach to when running a command. Fixes #234. 2013-04-02 18:07:16 -07:00
Solomon Hykes c77063afcd Add test for attaching only stdin at run with 'docker run -i -a=stdin' 2013-04-02 18:05:19 -07:00
Guillaume J. Charmes a19a9e3ca8 Discarding errors in CmdRun 2013-04-02 12:21:35 -07:00
Guillaume J. Charmes ad2bbe23be Close the broadcaster once they are not needed anymore 2013-04-02 12:19:01 -07:00
Guillaume J. Charmes 6882c78ce4 Add a stdincloser to container.Attach in order to close the client connection when needed 2013-04-02 12:18:20 -07:00
Solomon Hykes 2db358146f 'docker run' in attached mode no longer waits for the process to exit. Take this into account in the tests. 2013-04-02 11:07:49 -07:00
Solomon Hykes 1cc1cb099e When simulating disconnects in the tests, make sure that the command returns - but don't check for a specific return value 2013-04-02 11:06:42 -07:00
Solomon Hykes aea2675f7b Activate Config.StdinOnce at argument parsing 2013-04-02 11:02:19 -07:00
Solomon Hykes 8f9e454241 [unit tests] Cleanly kill all containers before nuking a temporary runtime 2013-04-02 11:00:14 -07:00
Solomon Hykes 7666307931 Use an environment variable to activate debug mode, instead of a package-specific flag 2013-04-02 10:58:16 -07:00
shin- 791ca6fde4 Better crash simulation in TestRestore ; force state lock creation when loading a container from disk 2013-04-02 10:06:49 -07:00
Guillaume J. Charmes 43484e8b50 Add a TestRunExit, make sure cmdRun returns after process dies 2013-04-02 09:22:30 -07:00
Shawn Siefkas 5471f5b2ee Implementing dirty git checkout indicator 2013-04-02 09:58:19 -05:00
shin- 02c211a0dc variable names 2013-04-02 07:13:42 -07:00
shin- c780ff5ae7 More thorough test case, use container.Stop() instead of lxc-kill,
use setStopped() during the restore step
2013-04-02 07:01:43 -07:00
shin- 8edf0ca7f3 Merge branch 'master' into 257-container_real_running_state-fix 2013-04-02 06:37:50 -07:00
Joffrey F 927308cfd9 Merge pull request #317 from dotcloud/307-loginfix
Fix for #307
2013-04-02 03:01:23 -07:00
shin- 8fed600077 Fix for #307 2013-04-02 03:00:21 -07:00
Robert Obryk a83d87abd4 Renamed writeBroadcaster.Close() to CloseWriters(). 2013-04-02 10:45:17 +02:00
Solomon Hykes c808940c04 Refactored CmdRun and CmdAttach to use Container.Attach 2013-04-01 23:52:20 -07:00
Thatcher Peskens 81874ad442 Fixed a lot of language and small things. 2013-04-01 19:11:09 -07:00
Solomon Hykes 3478d6f706 Merge pull request #288 from titanous/expand-contributing
Expand the contributing guidelines
2013-04-01 18:45:18 -07:00
Solomon Hykes 13b6309138 Merge pull request #312 from sa2ajj/devenv-doc-fix
fix code block formatting
2013-04-01 18:40:29 -07:00
Mikhail Sobolev 90db9e7517 fix code block formatting 2013-04-02 04:35:54 +03:00
Thatcher Peskens f15889461d Merge remote-tracking branch 'dotcloud/master' into dhrp/docs 2013-04-01 18:11:46 -07:00
Guillaume J. Charmes dea4194f8b Merge pull request #286 from titanous/285-close-bodies
Close HTTP response bodies
2013-04-01 17:59:22 -07:00
Solomon Hykes e331f1ee0e Merge pull request #305 from fsouza/master
Makefile: simplify "fmt" target
2013-04-01 16:28:29 -07:00
unclejack 0ddc6867fb use xz compression when pushing images to the registry
This makes the xz compression the default.
2013-04-02 02:19:34 +03:00
unclejack 3c5d2e4661 add support for xz compression
This adds xz as a compression option.
xz is alread supported by bsdtar without the external xz program.
2013-04-02 02:16:28 +03:00
Solomon Hykes ff5cb8e864 Images can be removed by short-hand ID. Solves #306. 2013-04-01 16:04:44 -07:00
Solomon Hykes 7ad2e022fb Add test to reproduce issue #306 2013-04-01 16:02:02 -07:00
Mikhail Sobolev f65fc1e766 add host name parameter to "run" command
fixes #243
2013-04-02 01:26:17 +03:00
Mikhail Sobolev dcc9dfb27d make complex options to stand out 2013-04-02 01:26:17 +03:00
Francisco Souza 650dff73bd makefile: simplify "fmt" target, and include -s flag 2013-04-01 18:50:25 -03:00
Solomon Hykes 6d00145076 Merge pull request #304 from paulhammond/mkimage-busybox-fixes
Fix mkimage-busybox
2013-04-01 14:38:00 -07:00
Paul Hammond cc2558bf10 Fix mkimage-busybox 2013-04-01 14:34:12 -07:00
Shawn Siefkas e566b89a5f Shortening the git commit used in the version command 2013-04-01 16:31:33 -05:00
Solomon Hykes 47c4c2abd4 Merge remote-tracking branch 'origin/progress_bar_push_pull' 2013-04-01 13:49:07 -07:00
Solomon Hykes fa5bb5acf1 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-01 13:44:19 -07:00
Solomon Hykes 50500cfcb6 Merge pull request #300 from cespare/make-fmt
Add a 'fmt' target to the Makefile.
2013-04-01 13:41:53 -07:00
Guillaume J. Charmes 9e81ab65cb Merge pull request #301 from dotcloud/container_test_improvment-1
Avoid destroy() timeout by closing stdin in TestStart()
2013-04-01 13:36:02 -07:00
Guillaume J. Charmes ff26493fd5 Merge pull request #298 from cespare/cleanup-1
Some style, text, and comment cleanup.
2013-04-01 13:26:40 -07:00
Caleb Spare 9b13d21fc9 Add a 'fmt' target to the Makefile.
A convenience for gofmting all the code, including subpackages.
2013-04-01 13:05:00 -07:00
Caleb Spare 887f509d1d Don't use an interface{} where a string will do. 2013-04-01 12:56:59 -07:00
Caleb Spare 13d2b08638 A few spelling/grammar corrections. 2013-04-01 12:56:50 -07:00
Caleb Spare c298a91f95 Use a *println or *print function instead of *printf where appropriate. 2013-04-01 12:17:00 -07:00
Shawn Siefkas 37a78902db Adding git commit to the version output
The Makefile must be used in order to inject the git commit
via -ldflags.
2013-04-01 13:52:45 -05:00
Caleb Spare 15b3088157 Don't convert []byte to string unnecessarily. 2013-04-01 11:15:40 -07:00
Caleb Spare 7830cf9166 Don't use a strings.Reader where a bytes.Reader will do.
There are several places where a []byte is converted to a string
and then fed into strings.NewReader().
2013-04-01 11:15:10 -07:00
Jonathan Rudenberg 321d94b17e Expand the contributing guidelines 2013-04-01 12:35:04 -04:00
Jonathan Rudenberg 6b59cc8a10 Close HTTP response bodies
Fixes #285.
2013-04-01 09:51:56 -04:00
Guillaume J. Charmes 91b1f9eee9 Avoid destroy() timeout by closing stdin in TestStart() 2013-03-31 22:42:10 -07:00
Solomon Hykes c9a13147fe Merge pull request #238 from johncosta/42-contribution-guidelines
Contribution guidelines
2013-03-31 22:14:18 -07:00
Solomon Hykes 1632566ecb Show shorthand image IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup images 2013-03-31 22:11:55 -07:00
Solomon Hykes a52a28b609 Temporarily disable a broken test (waiting for @creack to fix it), and silence a warning which pollutes unit tests but is complicated to fix 2013-03-31 22:05:14 -07:00
Solomon Hykes 54443c092c gofmt 2013-03-31 22:04:59 -07:00
Guillaume J. Charmes ad1e8a9b0f Add unit test for CmdAttach 2013-03-31 21:48:18 -07:00
Solomon Hykes 29b7ecb017 Merge pull request #272 from dominikh/improve/lazy-ip-allocator
Make IP allocator lazy
2013-03-31 21:04:35 -07:00
Dominik Honnef 6f9a67a7c7 Make IP allocator lazy
Instead of allocating all possible IPs in advance, generate them as
needed.

A loop will cycle through all possible IPs in sequential order,
allocating them as needed and marking them as in use. Once the loop
exhausts all IPs, it will wrap back to the beginning. IPs that are
already in use will be skipped. When an IP is released, it will be
cleared and be available for allocation again.

Two decisions went into this design:

1) Minimize memory footprint by only allocating IPs that are actually
in use

2) Minimize reuse of released IP addresses to avoid sending traffic to
the wrong containers

As a side effect, the functions for IP/Mask<->int conversion have been
rewritten to never be able to fail in order to reduce the amount of
error returns.

Fixes gh-231
2013-04-01 06:02:44 +02:00
Guillaume J. Charmes cfeed391d7 Change the commands unit tests in order to reflect the proper behaviour of CmdRun 2013-03-31 20:52:35 -07:00
Guillaume J. Charmes 8c36e6920a Working in progress: add unit tests for the running state check 2013-03-31 20:14:54 -07:00
Guillaume J. Charmes 3dcaf20d6b Check if the containers are really running when starting docker 2013-03-31 17:40:39 -07:00
Guillaume J. Charmes d949e2804a Add a check to avoid double start (resulting in dockerd to panic) and unit test for it 2013-03-31 14:15:10 -07:00
Guillaume J. Charmes 1fc9405537 Add progress bar on docker push 2013-03-31 13:53:47 -07:00
Guillaume J. Charmes b64dfdd8cd Add a progress bar to docker pull 2013-03-31 13:04:41 -07:00
Solomon Hykes a6779bcae2 Revert regression introduced in 81eac415ad, which caused 'docker run -i' to never close stdin 2013-03-31 02:44:56 -07:00
Solomon Hykes 8293a0d533 Bumped version to 0.1.1 2013-03-31 02:18:04 -07:00
Solomon Hykes 0b9a3c86a2 Show shorthand container IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup containers 2013-03-31 02:02:01 -07:00
Solomon Hykes 5a2a044e24 Merge remote-tracking branch 'origin/125-reattach_attached_run_command-fix' 2013-03-31 00:20:31 -07:00
Guillaume J. Charmes 99f9b69716 Add debug infos in CmdInfo to know the amount of fds and goroutines in use 2013-03-30 10:33:10 -07:00
Guillaume J. Charmes b336d928fe Make sure to close all pipes when detaching client (#228) 2013-03-30 09:47:09 -07:00
Guillaume J. Charmes 4760749402 Close the containers stdin when the process dies 2013-03-30 09:08:53 -07:00
Guillaume J. Charmes 7efde5eb83 Fix a scope issue preventing the close of slave stdin pty (#228) 2013-03-30 09:07:54 -07:00
Guillaume J. Charmes 5252ab697c Store the master ptys in order to close them when the process dies (#228) 2013-03-30 09:05:53 -07:00
Guillaume J. Charmes 41555f67e0 Merge pull request #269 from cespare/gofmt-1
Gofmt.
2013-03-30 12:46:47 -07:00
Robert Obryk 75ba07cb3a Swapped a map for a list in writeBroadcaster. 2013-03-30 16:04:19 +01:00
Robert Obryk 0bdfcfaa33 Make writeBroadcaster safe for concurrent use. 2013-03-30 16:02:22 +01:00
Guillaume J. Charmes 8cceafc834 Add unit test for the #125 scenario. Reattach after client disconnect on stdin allocated container 2013-03-30 06:55:47 -07:00
Caleb Spare 2d4c5ddbdd Gofmt. 2013-03-29 23:58:30 -07:00
Solomon Hykes d1ed28cb94 Merge remote-tracking branch 'robryk/cmdstream-deadlock' 2013-03-29 23:43:02 -07:00
Solomon Hykes 7dbb1eacc1 Merge remote-tracking branch 'origin/improve_container_tests' 2013-03-29 23:41:09 -07:00
Thatcher Peskens e9d17b1f91 Redundant message in basics. 2013-03-29 17:38:31 -07:00
Thatcher Peskens 6437648176 Added a lot of basic instructions on various topics 2013-03-29 17:30:10 -07:00
Daniel Mizyrycki e99541e637 packaging; issue #30: Original files to make the Ubuntu PPA on launch date 2013-03-29 14:57:31 -07:00
Robert Obryk 68278b66c5 Added a timeout to TestCmdStreamLargeStderr. 2013-03-29 22:36:36 +01:00
Solomon Hykes f483b214bb Merge remote-tracking branch 'robryk/bufreader-race' 2013-03-29 13:50:33 -07:00
Solomon Hykes f5b458b1dc Merge pull request #250 from metachord/master
Remove unnecessary path parts
2013-03-29 13:42:23 -07:00
Solomon Hykes f7b4f0c193 FIXME: implement a timeout in TestCmdStreamLArgStderr to avoid blocking the whole test suite when it fails 2013-03-29 13:37:52 -07:00
Solomon Hykes 6ede6bc8f2 Comment CmdStream a little bit to facilitate future fixes and contributions 2013-03-29 13:26:02 -07:00
Solomon Hykes fdae64d8d7 Merge remote-tracking branch 'robryk/cmdstream-deadlock' 2013-03-29 13:20:17 -07:00
Solomon Hykes f85e6548c7 Comment to explain CmdStream 2013-03-29 13:18:59 -07:00
Solomon Hykes c937e237ad Merged Ctrl-C interception by @creack 2013-03-29 13:12:04 -07:00
Guillaume J. Charmes 0ebdca5e61 Add unit test for multiple attach / restart 2013-03-29 10:56:49 -07:00
Guillaume J. Charmes 81eac415ad Do not close the stdin of the process when the client deattaches himslef 2013-03-29 09:42:42 -07:00
Guillaume J. Charmes 0b2eee8b33 Fix #108, reattach now works properly 2013-03-29 09:31:47 -07:00
Solomon Hykes d0d5d5ff09 Merge pull request #265 from dotcloud/formating_debug_harmonize
Formating debug harmonize
2013-03-29 21:30:43 -07:00
Solomon Hykes 57dfca052b Merge pull request #266 from dotcloud/do_not_log_stopped_container
Do not log non-running containers
2013-03-29 21:29:19 -07:00
Solomon Hykes 99b36c2c32 Add comments in graph.go 2013-03-29 21:13:59 -07:00
Solomon Hykes b013d93786 Merge remote-tracking branch 'origin/264-remove_cmdAttach_option' 2013-03-29 20:30:43 -07:00
Solomon Hykes b1fa21aa0e Merge remote-tracking branch 'lopter/master' 2013-03-29 20:17:33 -07:00
Louis Opter 9740102990 Fix output in the login command
It was broken because the terminal is in raw mode.

This changeset adds code in the login commmand to do a little bit of
interpretation on the user input (something usually done by the terminal
emulator itself).
2013-03-29 11:39:41 -07:00
Guillaume J. Charmes 0f7a4534c1 Do not log non-running containers 2013-03-29 08:46:06 -07:00
Guillaume J. Charmes 7a565a0479 Remove unused variable from container struct 2013-03-29 08:41:48 -07:00
Guillaume J. Charmes 69c2250ec2 Add some error checking in container monitor 2013-03-29 08:29:59 -07:00
Guillaume J. Charmes d17f78c373 Harmonize the error management. Use fmt.Errorf instead of errors.New 2013-03-29 08:19:42 -07:00
Guillaume J. Charmes ccac5b1382 Add debug infos 2013-03-29 08:18:43 -07:00
Guillaume J. Charmes 9442d6b349 Remove the options of CmdAttach 2013-03-29 07:49:26 -07:00
Guillaume J. Charmes 232dbb1864 Improve the containers unit tests (add error checking) 2013-03-29 07:44:58 -07:00
Robert Obryk 58befe3081 Fix a deadlock in CmdStream.
As per FIXME, CmdStream could have deadlocked if a command printed
enough on stderr. This commit fixes that, but still keeps all of
the stderr output in memory.
2013-03-29 12:55:48 +01:00
John Costa bd3c6793a1 remove dulicated text and correct contributing link 2013-03-29 07:06:58 -04:00
Robert Obryk d52451bcf8 Fix a race condition in bufReader.
The race condition cen be detected by running existing bufReader tests
with Go's race detector.
2013-03-29 11:00:50 +01:00
Maxim Treskin 6d72758f12 Remove unnecessary part of paths to lxc executables 2013-03-29 12:07:25 +07:00
Solomon Hykes 1d6929c8bc Fixed leftover from docs merge. Thanks @cespare for spotting! 2013-03-28 19:18:03 -07:00
Solomon Hykes 48a208baf1 Merging dhrp/docs 2013-03-28 19:12:58 -07:00
Thatcher Peskens 61cf09b2e7 Fixed some links in gettingstarted 2013-03-28 19:03:06 -07:00
Solomon Hykes b51fe837a4 Merge pull request #241 from titanous/cleanup-deps
Remove unneeded sqlite deps from puppet and debian control
2013-03-28 18:45:44 -07:00
Solomon Hykes 4e11e42546 Merge pull request #244 from dotcloud/docs-julien
Docs: Changed the url of the LEGO img to point to the one with copyright
2013-03-28 18:45:20 -07:00
Solomon Hykes ba33d67a1a Test that iptables() looks for iptables in the PATH 2013-03-28 18:44:47 -07:00
Solomon Hykes 70853785b6 Merge remote-tracking branch 'shawnsi/iptables-wrapper' 2013-03-28 18:40:02 -07:00
Solomon Hykes 12a65dc4a8 Merge remote-tracking branch 'titanous/camelize' 2013-03-28 18:23:59 -07:00
Solomon Hykes b67fe1ecb9 Merge pull request #246 from titanous/update-authors
Update AUTHORS and add .mailmap
2013-03-28 18:19:05 -07:00
Jonathan Rudenberg 6bcc55f7d0 Update AUTHORS and add .mailmap 2013-03-28 20:53:54 -04:00
Jonathan Rudenberg a6da7f138c Camelize some snake_case variable names 2013-03-28 20:12:23 -04:00
Julien Barbier d66de319bd Docs: Changed the url of the LEGO img to point to the one with copyright 2013-03-28 17:09:36 -07:00
John Costa 760736b3f3 add contributing guidlines md file 2013-03-28 20:04:21 -04:00
Solomon Hykes 0636c11f0b Merge remote-tracking branch 'origin/165-push_permission_check-fix' 2013-03-28 15:45:00 -07:00
Jonathan Rudenberg 5dc1e66366 Remove unneeded sqlite deps from puppet and debian control 2013-03-28 18:38:53 -04:00
John Costa a5054184a1 move documentation changes to reStructuredText docs under website. https://github.com/dotcloud/docker/issues/42 2013-03-28 16:32:31 -04:00
Thatcher Peskens 09910785c8 Merge remote-tracking branch 'dotcloud/master' into dhrp/docs
Conflicts:
	docs/sources/examples/python_web_app.rst
2013-03-28 12:48:32 -07:00
Shawn Siefkas 523803d633 Handling iptables() errors more usefully during portmapper setup 2013-03-28 14:44:54 -05:00
Thatcher Peskens 4bd21e0d7f Merge remote-tracking branch 'dotcloud/master' into dhrp/docs 2013-03-28 12:36:14 -07:00
Shawn Siefkas c66d2b6a53 Return error when iptables is not found 2013-03-28 14:30:56 -05:00
Thatcher Peskens da69df5f42 Added the lego illustration to the docs.docker.io 'homepage' 2013-03-28 12:27:37 -07:00
Thatcher Peskens 32b58159cd Changed the lego illustration on /README.md to the version which contains the copyright in the image itself. 2013-03-28 12:18:22 -07:00
Shawn Siefkas dfc3904f77 Looking for iptables in PATH 2013-03-28 14:02:50 -05:00
Solomon Hykes 4825d3a537 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-03-28 11:54:33 -07:00
Ken Cochrane 5c639118d3 fixed some of the syntax in example
The example was broken, I updated it to work with latest version of code.
2013-03-28 15:51:10 -03:00
Thatcher Peskens 9bc7e71f16 Removed $'s from examples to make them easier to copy paste 2013-03-28 11:50:00 -07:00
Solomon Hykes 19316955dd Merge remote-tracking branch 'origin/174-remove_image_twice-fix' 2013-03-28 11:48:41 -07:00
Thatcher Peskens 172f746e4d Fixed links on gettingstarted to point to the right places in docs 2013-03-28 11:44:33 -07:00
Solomon Hykes 47e5d2f5e1 Merge remote-tracking branch 'origin/docs' 2013-03-28 11:12:00 -07:00
Thatcher Peskens 70594bdd16 Merge remote-tracking branch 'dotcloud/master' into local/dotcloud/docs 2013-03-28 10:58:01 -07:00
Ken Cochrane 09e69e45a6 Merge pull request #225 from dhrp/readthedocs
#225 Update the docs to work with http://docs.docker.io
2013-03-28 06:58:21 -07:00
Ken Cochrane 9528b8685f Merge pull request #229 from mynamewastaken/master
Fixed typo in description
2013-03-28 06:55:40 -07:00
mynamewastaken b3cbe87b62 Update README.md
Fixed typo
2013-03-28 02:55:28 -05:00
Guillaume J. Charmes 6a236184af Change hardcoded "0" onto os.Stdin.Fd() 2013-03-27 23:56:36 -07:00
Guillaume J. Charmes 108acc0511 #214 Better signal handling 2013-03-27 23:54:53 -07:00
Charles Hooper e37ce11cfa Merge pull request #227 from chooper/issue226_vagrant
Remove /usr/local/bin/docker from Vagrant VirtualMachine image during provisioning
2013-03-27 22:56:37 -07:00
Charles Hooper fa89076673 Remove /usr/local/bin/docker 2013-03-28 05:28:11 +00:00
Charles Hooper 5aba56e0e0 Merge remote-tracking branch 'upstream/master' 2013-03-28 02:08:04 +00:00
Charles Hooper daa7e4a203 Merge pull request #184 from titanous/simplify-vagrant
vagrant: Simplify provisioning to build from repo
2013-03-27 19:07:20 -07:00
Jonathan Rudenberg a3ab89df2b vagrant: Simplify provisioning to build from repo
This sets up an idiomatic Go workspace in /opt/go with the source
shared from the host directory in
/opt/go/src/github.com/dotcloud/docker and docker installed into
/opt/go
2013-03-27 21:55:25 -04:00
Thatcher Peskens 90fb5dc962 Made all paths "pretty url's" including gettingstarted. 2013-03-27 17:01:50 -07:00
Thatcher Peskens 3b71336edc Made changes to incorporate extermal docs.docker.io. Also took out /documentation/ dir so sources are easier accessible and the folder is not redundant on docs.docker.io/documentation/ 2013-03-27 16:43:13 -07:00
Guillaume J. Charmes baea0a98f8 Add unit test for #174 Delete image already deleted then repulled 2013-03-27 12:09:58 -07:00
Solomon Hykes d8dc6d4583 Merged branch sa2ajj/top-level-makefile 2013-03-27 11:50:01 -07:00
Charles Hooper 95d87f1ac0 Merge remote-tracking branch 'upstream/master' 2013-03-27 14:50:42 +00:00
Charles Hooper 7e9975d00a Merge pull request #205 from crazysim/docker-local-shared
Use the directory where the Vagrantfile is located for SyncFolders instead of a hard-coded "~/docker"
2013-03-27 07:34:58 -07:00
Ken Cochrane 212a044a55 changed docker import to docker pull
changed docker import to docker pull, still need to make sure that the image is in the registry.
2013-03-27 10:44:20 -03:00
Ken Cochrane 165a7f3670 change docker import to docker pull
change docker import to docker pull in the basecommands doc
2013-03-27 10:43:05 -03:00
Ken Cochrane 0d75c68e5e Merge pull request #209 from gottagetmac/patch-1
Fixed typo in command description for pull
2013-03-27 06:06:15 -07:00
Daniel Robinson ff04ce3ddf Fixed typo in command description for pull 2013-03-27 10:02:11 -03:00
Nelson Chen 43213dfc4a use the directory where the vagrantfile is located for mounting 2013-03-26 23:14:50 -07:00
Solomon Hykes 4a086dfc08 Fixed broken examples in docs 2013-03-26 20:28:46 -07:00
Charles Hooper 6b54a439b2 Merge pull request #204 from dhrp/master
Added amazon install path to documentation.
2013-03-26 20:23:21 -07:00
Charles Hooper 00b81936aa Merge pull request #192 from chooper/vagrant11-providers
Fix AWS provisioning with Vagrant
2013-03-26 20:18:09 -07:00
Solomon Hykes b2e16f941d Merge pull request #199 from dotcloud/smalldocs
Small update to docs
2013-03-26 20:12:03 -07:00
Solomon Hykes 72563925a1 Merge pull request #200 from dhrp/update-examples
Update examples
2013-03-26 20:11:07 -07:00
Solomon Hykes f951f7876b Merge pull request #203 from hblanks/remove-run-dash-a
docs - remove references to run -a
2013-03-26 20:08:25 -07:00
Hunter Blanks 7e4ac6c689 docs - remove references to run -a 2013-03-26 19:31:50 -07:00
Charles Hooper 9e5a25c100 Merge remote-tracking branch 'upstream/master' 2013-03-27 02:19:52 +00:00
Charles Hooper 8461196a79 Stop using custom AMI and use standard Ubuntu AMI 2013-03-27 01:41:47 +00:00
Charles Hooper 5bec4b8f04 Fix Rackspace cloud user, remove dupe /home/vagrant definition 2013-03-27 01:41:06 +00:00
Thatcher Peskens 502f772839 not debian, but ubuntu is in base image 2013-03-26 18:28:46 -07:00
Thatcher Peskens 8cfaf658cc Updated hello world examples 2013-03-26 18:21:52 -07:00
Charles Hooper 2b7284db4f Remove duplicate user definition 2013-03-27 01:20:45 +00:00
Charles Hooper 2b090320be Merge remote-tracking branch 'upstream/master' into vagrant11-providers
Conflicts:
	puppet/modules/docker/manifests/init.pp
2013-03-27 01:09:22 +00:00
root 378dacdf1c added copyright for LEGO picture 2013-03-26 17:25:35 -07:00
Thatcher Peskens 8513c179f3 Added files REQUIRED to have succesfull gh-pages deploy (i.c.w. sphinx) 2013-03-26 17:25:26 -07:00
Solomon Hykes a710475726 Merge pull request #135 from amesserl/raxcloud-support
Added support to use docker with Rackspace Cloud Servers
2013-03-26 16:55:01 -07:00
Solomon Hykes a8ae0aafe3 Add unit test for container id format 2013-03-26 16:54:13 -07:00
Jonathan Rudenberg 9518503ebe Remove extraneous rand.Seed 2013-03-26 19:29:53 -04:00
Jonathan Rudenberg 141b5fc7d7 Simplify id generation
Instead of using a SHA-256 of a random number, hex encode 32 bytes
of random data from crypto/rand (sourced from /dev/urandom).
2013-03-26 19:29:44 -04:00
Thatcher Peskens 709849e717 Added Amazon AWS tutorial (can be activated after @sub_'s pull request is accepted. 2013-03-26 16:29:21 -07:00
Solomon Hykes 2ee3db6cd2 Merge pull request #193 from vivekagr/master
Fixed a misspelled command in the docs.
2013-03-26 15:39:48 -07:00
Solomon Hykes 84d1929973 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-03-26 15:36:07 -07:00
Charles Hooper 195208593d Merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	README.md
2013-03-26 22:30:49 +00:00
Solomon Hykes 846a9e8963 When doing a reverse-lookup of an image's tag, if the image has multiple tags, the first tag in alphabetical order will be used 2013-03-26 15:30:16 -07:00
Vivek Agarwal 5cec37de53 Fixed a misspelled command in the docs.
`vagrant up` command was misspelled as `vagant up`.
2013-03-27 03:54:26 +05:30
Thatcher Peskens 261003ceb0 Merge remote-tracking branch 'dotcloud/docs' 2013-03-26 14:52:00 -07:00
Guillaume J. Charmes e260e80814 Merge pull request #190 from dotcloud/189-broken_env_tty_mode-fix
#189 Fix the env in TTY mode
2013-03-26 14:44:30 -07:00
Ken Cochrane 2d71e2a44c Merge pull request #186 from pbogdan/fix-docs-document-title
Improve document <title>'s for the docs.
2013-03-26 14:36:43 -07:00
Thatcher Peskens 84df72222d Typo in macosx tutorial 2013-03-26 14:31:45 -07:00
Piotr Bogdan 08f1e3af48 Improve document <title>'s for the docs. 2013-03-26 21:25:42 +00:00
Charles Hooper afdf29e57f Fix issue where Vagrant AWS deploys outside of my dev account would fail 2013-03-26 21:21:54 +00:00
Daniel Mizyrycki 262be79041 Merge pull request #181 from dhrp/master
These are the necessary changes to tell github to not use jekyill and listen to http://docker.io
2013-03-26 13:20:51 -07:00
Solomon Hykes 8da1810975 Merge remote-tracking branch 'origin/175-auto_download_run-feature' 2013-03-26 13:20:32 -07:00
Solomon Hykes 9df7023497 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-03-26 13:15:21 -07:00
Solomon Hykes 54fa59c8ec Set the container's hostname to the truncated ID 2013-03-26 13:14:44 -07:00
Solomon Hykes 2664139da4 Example of sharing an image in the README 2013-03-26 13:07:06 -07:00
Solomon Hykes 6bf4a10ed4 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-03-26 12:57:42 -07:00
Solomon Hykes 7f79fabaee Added missing 'docker pull' to first example 2013-03-26 12:52:11 -07:00
Solomon Hykes 3813fa8a16 Rephrased answer to Q4 in the FAQ 2013-03-26 12:34:23 -07:00
Daniel Mizyrycki 75a116bdaa Add more links and a question to the faq 2013-03-26 12:14:58 -07:00
Thatcher Peskens f87aa7e336 Added files REQUIRED to have succesfull gh-pages deploy (i.c.w. sphinx) 2013-03-26 12:00:46 -07:00
Solomon Hykes 1904003511 Emphasized 'not for production' warning 2013-03-26 11:58:42 -07:00
Solomon Hykes 84cca8afc8 Changed project description in home page 2013-03-26 11:46:51 -07:00
Solomon Hykes 1a96ce552f Merge remote-tracking branch 'dhrp/master' 2013-03-26 11:34:21 -07:00
Solomon Hykes 7db1890c99 New 'make github-deploy' rule to deploy the docs to github-pages 2013-03-26 11:27:36 -07:00
Charles Hooper 5cebc226cc Use new AMI that won't cause issues with cloud-init apply_creds 2013-03-26 17:40:56 +00:00
Thatcher Peskens 1c5162c5a9 Added two user quotes. Cleanup of images. 2013-03-26 10:03:10 -07:00
Solomon Hykes 53641e8b8d Merged documentation 2013-03-26 09:49:10 -07:00
Solomon Hykes 038fb523f1 Merge pull request #168 from johncosta/42-contribution-guidlines
incorporate feedback from https://github.com/dotcloud/docker/issues/42
2013-03-26 09:42:14 -07:00
Solomon Hykes b70858ccae Merge pull request #169 from sa2ajj/no-executable-sources
remove executable bit from lxc_template.go
2013-03-26 09:41:37 -07:00
Thatcher Peskens f7d69601c5 Added line "docker is not ready for production" to tutorials 2013-03-26 08:50:34 -07:00
shin- 2333be46aa Re-enabled help for run command and added client-side error messages when arguments are missing 2013-03-26 08:31:26 -07:00
Mikhail Sobolev f961ec55e7 print the location of the built binary 2013-03-26 17:19:58 +02:00
Mikhail Sobolev 21f55419b7 allow for verbose output from go tools 2013-03-26 17:19:58 +02:00
Mikhail Sobolev a26c58e27e slightly re-phrase the build from source in README 2013-03-26 17:19:58 +02:00
Mikhail Sobolev 5a0010abe9 do not print executed commands 2013-03-26 17:19:58 +02:00
Mikhail Sobolev a57b37ed0e use .gopath/ instead of build/ 2013-03-26 17:19:57 +02:00
Mikhail Sobolev 6b4bc971fd add a test target 2013-03-26 17:19:57 +02:00
Mikhail Sobolev 7009d6c6dd introduce top-level Makefile to build the docker binary 2013-03-26 17:19:54 +02:00
Mikhail Sobolev b2b6d519c5 remove executable bit from lxc_template.go 2013-03-26 16:36:49 +02:00
shin- 3cce89d8ed Fixed issue with misplaced cursor after output 2013-03-26 07:10:31 -07:00
Guillaume J. Charmes cca59081de #189 Fix the env in TTY mode 2013-03-26 07:01:59 -07:00
John Costa e53f45f621 incorporate feedback from https://github.com/dotcloud/docker/issues/42 2013-03-26 09:17:44 -04:00
Guillaume J. Charmes 004a5310d9 Try to fetch missing base only on "not found" error 2013-03-26 05:28:17 -07:00
Guillaume J. Charmes 6ccd473127 Improve the pre-push repository lookup for permisisons 2013-03-26 04:12:08 -07:00
Guillaume J. Charmes 161526d99d Add a lookup before pushing repository to check permissions 2013-03-26 04:12:08 -07:00
Guillaume J. Charmes 069918e1fd #174 Check if the image is already in the garbage before moving it. If it does, remove (really) the older one. 2013-03-26 03:33:47 -07:00
Guillaume J. Charmes 91d78a10c3 #175 Add autodownload on run command 2013-03-26 03:05:10 -07:00
Thatcher Peskens 6f80674d66 Fixed a little problem in the style 2013-03-25 21:16:33 -07:00
Thatcher Peskens 3150a789c1 Fixed a little problem in the style 2013-03-25 21:07:56 -07:00
Thatcher Peskens f37a693825 Improved README 2013-03-25 20:48:04 -07:00
Guillaume J. Charmes 7e540a083f Merge pull request #164 from kencochrane/users
Fixed help commands that were printing double.
2013-03-25 20:18:30 -07:00
Solomon Hykes 522b8bf2c1 Merge branch 'origin/18-termcap_issues-fix' 2013-03-25 20:09:58 -07:00
Thatcher Peskens 243eea36ca Merge remote-tracking branch 'origin/master' 2013-03-25 19:53:14 -07:00
Thatcher Peskens 69b09ccfc8 Merge of docker-website into the docker documentation. 2013-03-25 19:52:52 -07:00
Guillaume J. Charmes 41a2954e4e MakeRaw on given fd instead of 0 2013-03-25 19:31:20 -07:00
Guillaume J. Charmes c85db1003b Force xterm as TERM in tty mode 2013-03-25 19:20:18 -07:00
Solomon Hykes 7943a02cb6 Improved error checking of 'docker pull' by printing body of HTTP error 2013-03-25 18:50:02 -07:00
Solomon Hykes f70bc2c98c Cleaned up error checking of 'docker pull', to be symmetrical to 'docker push' 2013-03-25 18:48:57 -07:00
dhrp 022a1f9957 Updated README.md to prepare for docs merge 2013-03-25 18:46:13 -07:00
Guillaume J. Charmes 211ed0a766 Merge branch '18-termcap_issues-fix' of github.com:dotcloud/docker into 18-termcap_issues-fix 2013-03-25 18:45:07 -07:00
Guillaume J. Charmes 50bee2f811 Fix termcaps on the linux client 2013-03-25 18:44:05 -07:00
Guillaume J. Charmes 922a8648fc Fix termcaps on the linux client 2013-03-25 18:43:25 -07:00
Ken Cochrane c9d93cd333 fixed issue with rmi help showing help twice 2013-03-25 21:35:31 -04:00
Ken Cochrane a9a439183d fixed an issue with the help history command, printed twice 2013-03-25 21:33:56 -04:00
Solomon Hykes e4a69b1044 Cleaned up error checking of 'docker push' 2013-03-25 17:20:55 -07:00
Solomon Hykes b31211cbe9 Cleaned up UI of 'docker push' 2013-03-25 17:20:26 -07:00
Solomon Hykes d01b5894c4 Unit tests fetch their base image with 'docker pull docker-ut' 2013-03-25 17:18:56 -07:00
Guillaume J. Charmes 504663a6ee Skip missing images instead of failing the push 2013-03-25 15:29:42 -07:00
Solomon Hykes bd63ae72e6 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-03-25 14:25:17 -07:00
Charles Hooper 4c19c9341c Merge remote-tracking branch 'upstream/master' 2013-03-25 19:41:24 +00:00
Sam Alba 222c04a7e7 Merge pull request #154 from dotcloud/153-commitnorepo
Clearer information when listing images
2013-03-25 12:04:57 -07:00
Charles Hooper fcdfd696ec Merge remote-tracking branch 'upstream/master' 2013-03-25 18:24:45 +00:00
shin- c8ca50b483 Fixed issue #158 (docker crashes when docker run is called with not enough arguments) 2013-03-25 07:17:11 -07:00
Guillaume J. Charmes a61e68275a Merge branch 'master' of github.com:dotcloud/docker 2013-03-25 01:29:09 -07:00
Guillaume J. Charmes 6576b19a28 Improve the debug function 2013-03-25 01:29:01 -07:00
Guillaume J. Charmes ceb66fd035 Merge pull request #152 from srid/patch-1
`docker import` doesn't download an image
2013-03-24 16:58:35 -07:00
Guillaume J. Charmes 22598ee572 Merge pull request #155 from sa2ajj/debian-control-fix
fix run-time dependency
2013-03-24 16:54:01 -07:00
Guillaume J. Charmes 52969416bc Merge pull request #147 from dotcloud/146_autologin-feature
#146 Auto login on push
2013-03-24 16:52:50 -07:00
Mikhail Sobolev c61172f9c2 fix run-time dependency 2013-03-25 01:36:59 +02:00
shin- 0786d9ec22 Show <none> instead of an empty string in docker images listing for images with no repository or tag 2013-03-24 15:01:41 -07:00
shin- 938bf4c901 Reverted previous change 2013-03-24 14:53:00 -07:00
shin- 87d4e16568 Quick fix to avoid creating empty-string repositories when committing 2013-03-24 14:38:10 -07:00
Sridhar Ratnakumar 55c8908756 docker import doesn't download an image
```
$ docker import base
Downloading from http://base
Error: Get http://base: lookup base: no such host
```
only `docker pull` does:

```
$ docker pull base
Pulling base...
Pulling repo: https://registry.docker.io/v1/users/base
Pull completed
```
2013-03-24 14:13:08 -07:00
Guillaume J. Charmes 51455b1ee0 Merge pull request #138 from srid/handle-port-mapper-error
handle errors during the creation of port mapper
2013-03-24 10:27:03 -07:00
Ken Cochrane 906626b8f8 Merge pull request #143 from dotcloud/141-142_update_help-fix
141 142 update help fix
2013-03-24 07:07:24 -07:00
Charles Hooper 94b9ca988d Fix missing group "Vagrant" error 2013-03-24 10:49:16 +00:00
Charles Hooper bea7894166 Merge remote-tracking branch 'amesserl/raxcloud-support'
Conflicts:
	Vagrantfile
2013-03-24 10:16:50 +00:00
Solomon Hykes b32436cd2e Prevent container.Kill() from crashing if container.cmd is nil 2013-03-23 19:51:35 -07:00
Solomon Hykes 190e2fa50f Generate full-size SHA256 IDs for images and containers 2013-03-23 19:33:00 -07:00
Solomon Hykes 0d46ddf7b4 'docker commit -m': optional commit message 2013-03-23 19:16:42 -07:00
Solomon Hykes f7eaaa3adb Clean up 'container' environment variable injected by lxc-start 2013-03-23 19:11:00 -07:00
Solomon Hykes 57e2126a02 Bumped version to 0.1.0 2013-03-23 17:48:18 -07:00
Solomon Hykes 5130d3d6ec Merge branch 'graph' 2013-03-23 17:47:33 -07:00
Solomon Hykes 587debf92e Merge branch 'graph' of http://github.com/dotcloud/docker into graph 2013-03-23 17:04:37 -07:00
Solomon Hykes d301c7b98c 'docker images' doesn't show all anonymous images by default - only anonymous heads 2013-03-23 17:03:30 -07:00
Solomon Hykes f43fbda2a4 No more dependency on sqlite 2013-03-23 16:17:01 -07:00
Guillaume J. Charmes e09383bccf Remove json alteration 2013-03-23 14:54:18 -07:00
Solomon Hykes 301a8afff5 Properly cleanup iptables rules inserted in OUTPUT (introduced in 3c6b8bb888) 2013-03-22 22:31:20 -07:00
Sridhar Ratnakumar 371225520f handle errors during the creation of port mapper
example:

  2013/03/22 21:42:55 Unable to setup port networking: Failed to create DOCKER chain

  (which was possibly introduced by commit 3c6b8bb88)
2013-03-22 21:44:01 -07:00
Guillaume J. Charmes eb95e49150 #146 Auto login on push 2013-03-22 19:04:12 -07:00
Guillaume J. Charmes 96010e3ca1 Allow anonymous pulls 2013-03-22 18:46:47 -07:00
Guillaume J. Charmes e55b8b2fd9 Merge pull request #145 from dotcloud/144-login_daemon_mode-fix
Login now works with daemon mode
2013-03-23 20:30:19 -07:00
Guillaume J. Charmes ffe5370e35 Login now works with daemon mode 2013-03-22 18:37:53 -07:00
Guillaume J. Charmes df19863b23 #142 Change the help for push and pull in order for it to be more clear 2013-03-22 18:17:49 -07:00
Guillaume J. Charmes cb3c4af404 #141 Update and order the help 2013-03-22 18:15:44 -07:00
Guillaume J. Charmes bd2a55cd26 Merge branch 'no_root_repo_push' 2013-03-22 17:58:34 -07:00
Guillaume J. Charmes b370acd679 Forbid users to push "root" repositories 2013-03-22 17:58:00 -07:00
Guillaume J. Charmes 5c04d3488a Implement the "library" repository endpoint on the registry 2013-03-22 17:43:11 -07:00
Solomon Hykes 690cae0ef4 Merge pull request #133 from shawnsi/master
Vagrant Provision Touch Up
2013-03-22 15:11:52 -07:00
Solomon Hykes 936bd87a52 Merge pull request #124 from donspaulding/master
Fix typos in the README
2013-03-22 15:10:13 -07:00
Guillaume J. Charmes dc2d930520 Remove the json alterations when decoding 2013-03-22 14:27:10 -07:00
Guillaume J. Charmes 966cddf26b Add some verbosity to the push/pull 2013-03-22 13:21:44 -07:00
Guillaume J. Charmes 6e35f28352 Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 13:10:31 -07:00
Solomon Hykes 0146c80c40 An image embeds the configuration of its parent container ('ContainerConfig') 2013-03-23 14:48:16 -07:00
Solomon Hykes b809dc4271 Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-23 14:18:41 -07:00
Solomon Hykes f37c432bd5 Fixed 'docker inspect' to exit silently when an image doesn't exist 2013-03-23 14:18:35 -07:00
Solomon Hykes d9471bee3d Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-23 12:39:36 -07:00
Solomon Hykes 6ce64e8458 Moved image name into config. runtime.Create() now receives a single Config parameter 2013-03-23 12:39:09 -07:00
Solomon Hykes 031f91df1a runtime.Create receives an image name + Config. The Config includes all required runtime information: command, environment, ports etc. 2013-03-23 12:16:58 -07:00
Guillaume J. Charmes 89763bc8af Remove the lookup before pushing 2013-03-22 13:10:17 -07:00
Guillaume J. Charmes 6e507b9460 Add a Debugf() helper and a -D (debug) flag to docker 2013-03-22 11:44:12 -07:00
Guillaume J. Charmes c57727fd65 Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 11:18:33 -07:00
Guillaume J. Charmes a2e5333a93 Make sure the remote repository exists prior to push 2013-03-22 10:42:13 -07:00
Guillaume J. Charmes 5e6355d182 Fix the lookup method 2013-03-22 10:22:22 -07:00
Joffrey F e4886a9e33 Merge pull request #134 from shawnsi/98-natfix
Fixing Issue #98: Adding DOCKER to output chain during iptables setup
2013-03-22 09:35:07 -07:00
Antony Messerli 95ad9e4573 Adding support for the Rackspace Open Cloud 2013-03-22 11:30:54 -05:00
Shawn Siefkas 3c6b8bb888 Fixing Issue #98: Adding DOCKER to output chain during iptables setup 2013-03-22 11:28:15 -05:00
Shawn Siefkas cff01ec5ec Redirecting docker daemon stdout/stderr to /var/log/dockerd 2013-03-22 10:30:47 -05:00
creack 0c4b639083 Update makefile gotest 2013-03-22 08:04:53 -07:00
creack d1c8eabc63 Fix/Improve push/pull registry 2013-03-22 07:56:44 -07:00
creack c000a5ed75 Remove the possibility to choose the remote name on push 2013-03-22 07:10:52 -07:00
Shawn Siefkas 9542876d2f Waiting to start docker until the fresh binaries have been copied in 2013-03-22 08:48:50 -05:00
creack 899613f788 Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 06:39:08 -07:00
Solomon Hykes 829eeb07f8 'docker run' with no argument no longer hardcodes a default image and command 2013-03-22 20:55:17 -07:00
Solomon Hykes 841c7ac0f9 Deprecated 'docker run -a'. Containers are run in the foreground by default. '-d' enables detached mode 2013-03-22 20:46:14 -07:00
Solomon Hykes 34fbaa5f6d 'docker run -e': set environment variables in a container 2013-03-22 20:36:34 -07:00
Solomon Hykes 9b5f0fac81 Fix 'docker import' to accept urls without explicit http:// scheme 2013-03-22 19:47:32 -07:00
creack 1ed78ee160 Improve (drastically) the push 2013-03-22 06:38:54 -07:00
creack e726bdcce2 Fix the rootPath for auth 2013-03-22 05:52:13 -07:00
creack ab3a57d01b Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 04:44:46 -07:00
Solomon Hykes bc51d961cd Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-22 19:22:24 -07:00
Solomon Hykes 12049f956a 'docker {history,ps,images}': show human-friendly image names when applicable 2013-03-22 19:22:06 -07:00
Solomon Hykes 7952e6befe Merge branch 'master' into graph 2013-03-22 18:30:46 -07:00
Solomon Hykes 72e16f6d96 Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-22 18:27:32 -07:00
Solomon Hykes bf7602bc09 'docker tag': assign a repository+tag to an image 2013-03-22 18:27:18 -07:00
Solomon Hykes 520af226c0 Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-22 17:52:27 -07:00
Solomon Hykes 542c66997f 'docker inspect' can lookup image by repository and tag 2013-03-22 17:52:19 -07:00
Solomon Hykes f8ebeaae10 Removed debug command 'docker mount' 2013-03-22 17:44:12 -07:00
Solomon Hykes 56752158af Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-22 17:40:32 -07:00
Solomon Hykes 09b27f9e8d Fancier output for 'docker history' 2013-03-22 17:22:32 -07:00
creack 77549ad4f6 Improve the error management with the registry communication 2013-03-22 04:44:07 -07:00
creack fc0eac37e4 Put back the "official" repo 2013-03-22 04:37:18 -07:00
creack db8f2a1a9d Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 04:35:19 -07:00
creack 08cb430281 Move the debian makefile to avoid confusions 2013-03-22 04:34:46 -07:00
shin- 9fa3d891c6 Merge branch 'master' of github.com:dotcloud/docker 2013-03-22 04:25:37 -07:00
shin- b00ff47963 Fixing newlines in attached mode 2013-03-22 04:24:03 -07:00
creack e02f7912bc Enforce login for push/pull 2013-03-22 03:43:57 -07:00
creack e4f9a0dca0 Update the help with push/pull 2013-03-22 03:24:37 -07:00
creack 3870ebee6d Add content type to Push 2013-03-22 03:22:36 -07:00
creack 062ebff098 Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 03:10:30 -07:00
creack 0eed4b4386 Add some verbosity to the push/pull features 2013-03-22 03:10:09 -07:00
creack 4307b7dd8e Add authentification to all registry call 2013-03-22 02:57:28 -07:00
creack c72ff318d3 Integrate Auth in runtime and make the config file relative to runtime root 2013-03-22 02:19:39 -07:00
creack 5e561a9d52 Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-22 01:27:16 -07:00
Solomon Hykes 640026ec59 Looking up a tag by repository name will default to REPOSITORY:latest. The empty tag '' is no longer allowed. 2013-03-22 16:07:13 -07:00
creack 11c4294846 Handle push/pull of repositories 2013-03-22 01:25:27 -07:00
Solomon Hykes 1850e8d49c Merge pull request #128 from cespare/markdown-fixes2
Fix numbering in README markdown.
2013-03-21 22:46:22 -07:00
Solomon Hykes afb4a36ffa Merge pull request #130 from dotcloud/113_vagrant-compat
113 vagrant compat
2013-03-21 22:44:38 -07:00
Daniel Mizyrycki 45df6f7801 vagrant; issue #113: normalize whitespaces 2013-03-21 22:26:18 -07:00
Daniel Mizyrycki 6295a02275 vagrant; issue #113: Make Vagrantfile backward compatible with versions < 1.1 2013-03-21 22:16:52 -07:00
dhrp 13e597a5ad create README.md at this place for preview. 2013-03-21 21:47:14 -07:00
Caleb Spare d515e2b06c Fix numbering in README markdown. 2013-03-21 21:46:00 -07:00
Solomon Hykes 41c664cacf Merge pull request #126 from cespare/markdown-fixes
Markdown fixes in the readme.
2013-03-21 18:24:46 -07:00
Caleb Spare 7566006d0d Markdown fixes in the readme. 2013-03-21 18:20:54 -07:00
creack d8fa52b7b5 Comply the tests with golang TIP 2013-03-21 10:31:02 -07:00
creack f246cc9cdd Apply the new WalkHistory prototype to merge 2013-03-21 10:12:05 -07:00
creack da266e6c7b Factorize the pull/push commands and create a registry.go 2013-03-21 10:10:14 -07:00
Solomon Hykes f50dcbe404 Image.ParentCommand and Image.ParentConatiner should be stored 2013-03-21 22:45:22 -07:00
Solomon Hykes cdd62522b6 Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph 2013-03-21 22:21:00 -07:00
Solomon Hykes 1ad69ad415 'docker history': show the history of an image 2013-03-21 21:42:18 -07:00
Solomon Hykes 05ae69a6eb 'docker commit' records parent container id and command, in addition to parent image 2013-03-21 21:13:27 -07:00
Solomon Hykes 8396798eba 'docker commit' can optionally tag the new image into a repository 2013-03-21 20:07:37 -07:00
Solomon Hykes 49a78929c6 Repositories and tags can't have ':' in their name (to allow parsing the REPO:TAG notation) 2013-03-21 20:06:20 -07:00
Solomon Hykes 379d449c44 'docker run' can reference an image by REPOSITORY:TAG 2013-03-21 19:01:55 -07:00
Solomon Hykes d0c776528b Fix a bug which caused repository metadata to be cleared at startup 2013-03-21 19:00:43 -07:00
Solomon Hykes 4af8b711c0 Fixed output quirks in 'docker images' 2013-03-21 18:59:12 -07:00
Solomon Hykes ef711962d5 Folded graph/ back into main package 2013-03-21 17:47:23 -07:00
Solomon Hykes 44faa07b6c First integration of runtime with repositories & tags 2013-03-21 17:35:49 -07:00
Solomon Hykes 680f40c37e graph.RepoStore: first draft of a Repository/Tag on top of the graph 2013-03-21 12:18:47 -07:00
shin- 3aefed2dc2 When lxcbr0 has several associated IPs, default to first one found 2013-03-21 09:19:22 -07:00
Don Spaulding 8ff60ddef4 Typos in the README 2013-03-21 08:39:52 -05:00
creack eef9659c95 merge graph in graph 2013-03-21 06:35:57 -07:00
creack 42cf74d56b POC: push/pull are (kinda) working 2013-03-21 06:33:29 -07:00
creack 04ba4348de Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-21 04:32:04 -07:00
creack 864a8d9aca Merge branch 'graph' of github.com:dotcloud/docker into graph 2013-03-21 03:54:24 -07:00
creack edcfd687ef POC of push/pull for images, pull works, push do push but without the layer 2013-03-21 03:53:27 -07:00
creack 3e8d1dfb69 Enforce model for the json image format 2013-03-21 03:52:58 -07:00
Solomon Hykes b6b5e5cec1 Merged master 2013-03-21 02:13:21 -07:00
Solomon Hykes f783759928 Docker currently doesn't support 32-bit hosts. Let's make that clear by failing right away with an informative message 2013-03-21 02:04:10 -07:00
Solomon Hykes c37d7aad36 Merge branch 'master' into graph 2013-03-21 01:43:32 -07:00
Solomon Hykes d65983f386 No need for a Container.networkManager field: it can be accessed via Container.runtime 2013-03-21 01:43:03 -07:00
Solomon Hykes 1ed13f65fe Merge branch 'master' into graph 2013-03-21 01:38:44 -07:00
Solomon Hykes 377cebe36f Renamed docker*.go to runtime*.go 2013-03-21 01:24:54 -07:00
Solomon Hykes 2f781f2128 Removed 'sparse export' mode, it is deprecated by the new diff-based transfer protocol 2013-03-21 01:24:12 -07:00
Solomon Hykes e627a0da1e Renamed 'docker tar' to 'docker export' for symmetry with 'docker import' 2013-03-21 01:23:00 -07:00
Solomon Hykes 623e91e2e3 Moved Go() to the main package... And got rid of the useless docker/future package 2013-03-21 01:13:55 -07:00
Solomon Hykes deb603aaf4 Removed unused utility future.Pv() 2013-03-21 01:10:44 -07:00
Solomon Hykes 0208b6accd moved GenerateId() to the graph package 2013-03-21 01:07:07 -07:00
Solomon Hykes d7c5d060c4 Moved Download() and progressReader{} to the main package 2013-03-21 00:54:54 -07:00
Solomon Hykes 299d0b2720 Moved HumanDuration() to the main package 2013-03-21 00:52:43 -07:00
Solomon Hykes b8547f31e4 Renamed Docker{} to Runtime{} for clarity 2013-03-21 00:41:15 -07:00
Solomon Hykes 7c57a4cfc0 Simplified the core container API, ported it to the new graph. Some features are missing eg. image 'paths' and tags 2013-03-21 00:25:00 -07:00
Solomon Hykes 84e8c4aa1d Fixed a bug in graph.Graph.Get() 2013-03-21 00:21:32 -07:00
Solomon Hykes 89a140fb75 Removed redundant mount_test.go (graph_test.go already tests the mount ability) 2013-03-21 00:21:03 -07:00
Guillaume J. Charmes 3e9877a30f Merge pull request #122 from srid/patch-1
remove ! from command line
2013-03-20 23:26:50 -07:00
Sridhar Ratnakumar 3bb176d8ae remove ! from command line
bash does not like it

```
$ JOB=$(docker run base /bin/sh -c "while true; do echo Hello world!; sleep 1; done")
bash: !: event not found
$
```
2013-03-20 22:53:42 -07:00
Solomon Hykes 34023558f5 Pruned more semi-useless commands: 'docker cat', 'docker cp', 'docker ls', 'docker write'. Removed outdated commands from help message 2013-03-20 22:48:52 -07:00
Solomon Hykes 9d82bab041 Removed anal warning from 'go vet' 2013-03-20 22:42:50 -07:00
Solomon Hykes 3eff62394b Removed dependency on the fake package in graph unit tests 2013-03-20 22:42:08 -07:00
Solomon Hykes 4d9c324495 Removed extra import 2013-03-20 22:41:31 -07:00
Solomon Hykes 75c866d6a3 Unmount() and Mounted(): utility functions to unmount a mountpoint and check if it's mounted, respectively 2013-03-20 22:41:03 -07:00
Solomon Hykes 6f6eaca861 Removed mount code from container. It belongs in graph 2013-03-20 22:16:02 -07:00
Solomon Hykes ea258c4492 docker/fs is deprecated by docker/graph 2013-03-20 22:15:09 -07:00
Solomon Hykes 240333277a Removed Image.Unmount(). It belongs in container code 2013-03-20 22:13:57 -07:00
Solomon Hykes 9e8278134d Image.Mount(): create rw and rootfs directory if they don't exist 2013-03-20 22:13:28 -07:00
Solomon Hykes c8db980add Image.Changes(): list all changes between an image and a rw directory 2013-03-20 22:12:38 -07:00
Guillaume J. Charmes 3f63e3426e Merge pull request #121 from ezbercih/patch-1
Fix issue #120, initialize TCPAddr w/ field names
2013-03-20 20:25:16 -07:00
Solomon Hykes 31296cc3f7 Removed deprecated or useless commands (cp, layers, reset, mirror, debug, web) 2013-03-20 20:21:59 -07:00
Solomon Hykes 33d2905cde Merge pull request #115 from termie/readme_update
update the dependencies for the dev environment
2013-03-20 15:20:18 -07:00
termie 2048354c8b update the dev requirements in readme
a little pedantic, perhaps, but on a fresh precise image from vagrant I
still needed these two packages to run the commands following it
2013-03-20 20:17:46 +00:00
Solomon Hykes 98542d4497 Merge branch 'master' into graph 2013-03-20 09:41:37 -07:00
shin- 6d580247c2 Removed 'fake' package. 2013-03-20 07:49:38 -07:00
creack ab99e9252d Complete pull request #121, init TCPAddr with named field 2013-03-20 06:02:25 -07:00
ezbercih fac32cda5a Fix issue #120, initialize TCPAddr w/ field names
Current Go tip (+74e65f07a0c8) and likely Go 1.1 does not build docker since net.TCPAddr struct has an additional field now for IPv6:

type TCPAddr struct {
    IP   IP
    Port int
    Zone string // IPv6 scoped addressing zone
}

Initializing the struct with named fields resolves this problem.
2013-03-21 00:11:16 -03:00
Solomon Hykes a3174fd874 Merge pull request #114 from jpetazzo/whiteboard20130319
Images & repositories, what they mean, and the protocol to push/pull them
2013-03-20 00:18:43 -07:00
Solomon Hykes ddf4c79977 Merge pull request #112 from srid/devenv
instructions to compile docker
2013-03-20 00:08:54 -07:00
Jérôme Petazzoni acd51ecea8 add pseudo-spec of images, repositories, push, and pull operations 2013-03-19 20:35:14 -07:00
Sridhar Ratnakumar 4389574aff instructions to compile docker 2013-03-19 20:17:32 -07:00
Solomon Hykes ff2ae90764 Merge pull request #110 from synack/master
Add linux-image-extra instructions to README
2013-03-19 18:46:28 -07:00
Jeremy Grosser 2508b5cef9 Update README.md 2013-03-19 18:45:11 -07:00
Solomon Hykes 3c1db4ca43 Ported test for image deletion 2013-03-18 17:57:18 -07:00
Solomon Hykes 33f6a0aaf5 docker/graph: a store for filesystem images and the graph of their relationships 2013-03-18 00:15:35 -07:00
jpetazzo 71c997dc83 Add contrib/ directory, README, and script to create a basic busybox image 2013-03-14 03:13:00 +00:00
555 changed files with 123575 additions and 5521 deletions
+14 -2
View File
@@ -1,8 +1,20 @@
.vagrant
.vagrant*
bin
docker/docker
.*.swp
a.out
*.orig
build_src
command-line-arguments.test
.flymake*
.idea
.DS_Store
docs/_build
docs/_static
docs/_templates
.gopath/
.dotcloud
*.test
bundles/
.hg/
.git/
vendor/pkg/
+40
View File
@@ -0,0 +1,40 @@
# Generate AUTHORS: git log --format='%aN <%aE>' | sort -uf | grep -v vagrant-ubuntu-12
<charles.hooper@dotcloud.com> <chooper@plumata.com>
<daniel.mizyrycki@dotcloud.com> <daniel@dotcloud.com>
<daniel.mizyrycki@dotcloud.com> <mzdaniel@glidelink.net>
Guillaume J. Charmes <guillaume.charmes@dotcloud.com> <charmes.guillaume@gmail.com>
<guillaume.charmes@dotcloud.com> <guillaume@dotcloud.com>
<kencochrane@gmail.com> <KenCochrane@gmail.com>
<sridharr@activestate.com> <github@srid.name>
Thatcher Peskens <thatcher@dotcloud.com> dhrp <thatcher@dotcloud.com>
Thatcher Peskens <thatcher@dotcloud.com> dhrp <thatcher@gmx.net>
Jérôme Petazzoni <jerome.petazzoni@dotcloud.com> jpetazzo <jerome.petazzoni@dotcloud.com>
Jérôme Petazzoni <jerome.petazzoni@dotcloud.com> <jp@enix.org>
Joffrey F <joffrey@dotcloud.com>
<joffrey@dotcloud.com> <f.joffrey@gmail.com>
Tim Terhorst <mynamewastaken+git@gmail.com>
Andy Smith <github@anarkystic.com>
<kalessin@kalessin.fr> <louis@dotcloud.com>
<victor.vieux@dotcloud.com> <victor@dotcloud.com>
<victor.vieux@dotcloud.com> <dev@vvieux.com>
<dominik@honnef.co> <dominikh@fork-bomb.org>
Thatcher Peskens <thatcher@dotcloud.com>
<ehanchrow@ine.com> <eric.hanchrow@gmail.com>
Walter Stanish <walter@pratyeka.org>
<daniel@gasienica.ch> <dgasienica@zynga.com>
Roberto Hashioka <roberto_hashioka@hotmail.com>
Konstantin Pelykh <kpelykh@zettaset.com>
David Sissitka <me@dsissitka.com>
Nolan Darilek <nolan@thewordnerd.info>
<mastahyeti@gmail.com> <mastahyeti@users.noreply.github.com>
Benoit Chesneau <bchesneau@gmail.com>
Jordan Arentsen <blissdev@gmail.com>
Daniel Garcia <daniel@danielgarcia.info>
Miguel Angel Fernández <elmendalerenda@gmail.com>
Bhiraj Butala <abhiraj.butala@gmail.com>
Faiz Khan <faizkhan00@gmail.com>
Victor Lyuboslavsky <victor@victoreda.com>
Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Matthew Mueller <mattmuelle@gmail.com>
<mosoni@ebay.com> <mohitsoni1989@gmail.com>
Shih-Yuan Lee <fourdollars@gmail.com>
+190 -13
View File
@@ -1,13 +1,190 @@
Solomon Hykes
Sam Alba
Jérôme Petazzoni
Andrea Luzzardi
Joffrey Fuhrer
Louis Opter
Niall O'Higgins
Brian McCallister
Jeff Lindsay
Ken Cochrane
Charles Hooper
Guillaume Charmes
Daniel Mizyrycki
# This file lists all individuals having contributed content to the repository.
# If you're submitting a patch, please add your name here in alphabetical order as part of the patch.
#
# For a list of active project maintainers, see the MAINTAINERS file.
#
Al Tobey <al@ooyala.com>
Alex Gaynor <alex.gaynor@gmail.com>
Alexander Larsson <alexl@redhat.com>
Alexey Shamrin <shamrin@gmail.com>
Andrea Luzzardi <aluzzardi@gmail.com>
Andreas Savvides <andreas@editd.com>
Andreas Tiefenthaler <at@an-ti.eu>
Andrew Macgregor <andrew.macgregor@agworld.com.au>
Andrew Munsell <andrew@wizardapps.net>
Andrews Medina <andrewsmedina@gmail.com>
Andy Rothfusz <github@metaliveblog.com>
Andy Smith <github@anarkystic.com>
Anthony Bishopric <git@anthonybishopric.com>
Antony Messerli <amesserl@rackspace.com>
Asbjørn Enge <asbjorn@hanafjedle.net>
Barry Allard <barry.allard@gmail.com>
Ben Toews <mastahyeti@gmail.com>
Benoit Chesneau <bchesneau@gmail.com>
Bhiraj Butala <abhiraj.butala@gmail.com>
Bouke Haarsma <bouke@webatoom.nl>
Brandon Liu <bdon@bdon.org>
Brandon Philips <brandon@ifup.co>
Brian McCallister <brianm@skife.org>
Brian Olsen <brian@maven-group.org>
Brian Shumate <brian@couchbase.com>
Briehan Lombaard <briehan.lombaard@gmail.com>
Bruno Bigras <bigras.bruno@gmail.com>
Caleb Spare <cespare@gmail.com>
Calen Pennington <cale@edx.org>
Charles Hooper <charles.hooper@dotcloud.com>
Christopher Currie <codemonkey+github@gmail.com>
Colin Dunklau <colin.dunklau@gmail.com>
Colin Rice <colin@daedrum.net>
Dan Buch <d.buch@modcloth.com>
Daniel Garcia <daniel@danielgarcia.info>
Daniel Gasienica <daniel@gasienica.ch>
Daniel Mizyrycki <daniel.mizyrycki@dotcloud.com>
Daniel Nordberg <dnordberg@gmail.com>
Daniel Robinson <gottagetmac@gmail.com>
Daniel Von Fange <daniel@leancoder.com>
Daniel YC Lin <dlin.tw@gmail.com>
David Calavera <david.calavera@gmail.com>
David Sissitka <me@dsissitka.com>
Deni Bertovic <deni@kset.org>
Dominik Honnef <dominik@honnef.co>
Don Spaulding <donspauldingii@gmail.com>
Dr Nic Williams <drnicwilliams@gmail.com>
Dražen Lučanin <kermit666@gmail.com>
Elias Probst <mail@eliasprobst.eu>
Emily Rose <emily@contactvibe.com>
Eric Hanchrow <ehanchrow@ine.com>
Eric Myhre <hash@exultant.us>
Erno Hopearuoho <erno.hopearuoho@gmail.com>
Evan Phoenix <evan@fallingsnow.net>
Evan Wies <evan@neomantra.net>
ezbercih <cem.ezberci@gmail.com>
Fabrizio Regini <freegenie@gmail.com>
Faiz Khan <faizkhan00@gmail.com>
Fareed Dudhia <fareeddudhia@googlemail.com>
Flavio Castelli <fcastelli@suse.com>
Francisco Souza <f@souza.cc>
Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
Gabriel Monroy <gabriel@opdemand.com>
Gareth Rushgrove <gareth@morethanseven.net>
Greg Thornton <xdissent@me.com>
Guillaume J. Charmes <guillaume.charmes@dotcloud.com>
Guruprasad <lgp171188@gmail.com>
Harley Laue <losinggeneration@gmail.com>
Hector Castro <hectcastro@gmail.com>
Hunter Blanks <hunter@twilio.com>
Isao Jonas <isao.jonas@gmail.com>
James Carr <james.r.carr@gmail.com>
Jason McVetta <jason.mcvetta@gmail.com>
Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Jeff Lindsay <progrium@gmail.com>
Jeremy Grosser <jeremy@synack.me>
Jim Alateras <jima@comware.com.au>
Jimmy Cuadra <jimmy@jimmycuadra.com>
Joe Van Dyk <joe@tanga.com>
Joffrey F <joffrey@dotcloud.com>
Johan Euphrosine <proppy@google.com>
John Costa <john.costa@gmail.com>
Jon Wedaman <jweede@gmail.com>
Jonas Pfenniger <jonas@pfenniger.name>
Jonathan Mueller <j.mueller@apoveda.ch>
Jonathan Rudenberg <jonathan@titanous.com>
Joost Cassee <joost@cassee.net>
Jordan Arentsen <blissdev@gmail.com>
Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Julien Barbier <write0@gmail.com>
Jérôme Petazzoni <jerome.petazzoni@dotcloud.com>
Karan Lyons <karan@karanlyons.com>
Karl Grzeszczak <karl@karlgrz.com>
Kawsar Saiyeed <kawsar.saiyeed@projiris.com>
Keli Hu <dev@keli.hu>
Ken Cochrane <kencochrane@gmail.com>
Kevin Clark <kevin.clark@gmail.com>
Kevin J. Lynagh <kevin@keminglabs.com>
kim0 <email.ahmedkamal@googlemail.com>
Kimbro Staken <kstaken@kstaken.com>
Kiran Gangadharan <kiran.daredevil@gmail.com>
Konstantin Pelykh <kpelykh@zettaset.com>
Kyle Conroy <kyle.j.conroy@gmail.com>
Laurie Voss <github@seldo.com>
Louis Opter <kalessin@kalessin.fr>
Manuel Meurer <manuel@krautcomputing.com>
Marco Hennings <marco.hennings@freiheit.com>
Marcus Farkas <toothlessgear@finitebox.com>
Marcus Ramberg <marcus@nordaaker.com>
Mark McGranaghan <mmcgrana@gmail.com>
Marko Mikulicic <mmikulicic@gmail.com>
Markus Fix <lispmeister@gmail.com>
Martin Redmond <martin@tinychat.com>
Matt Apperson <me@mattapperson.com>
Matt Bachmann <bachmann.matt@gmail.com>
Matthew Mueller <mattmuelle@gmail.com>
Maxim Treskin <zerthurd@gmail.com>
meejah <meejah@meejah.ca>
Michael Crosby <crosby.michael@gmail.com>
Michael Gorsuch <gorsuch@github.com>
Miguel Angel Fernández <elmendalerenda@gmail.com>
Mike Gaffney <mike@uberu.com>
Mikhail Sobolev <mss@mawhrin.net>
Mohit Soni <mosoni@ebay.com>
Morten Siebuhr <sbhr@sbhr.dk>
Nan Monnand Deng <monnand@gmail.com>
Nate Jones <nate@endot.org>
Nelson Chen <crazysim@gmail.com>
Niall O'Higgins <niallo@unworkable.org>
Nick Payne <nick@kurai.co.uk>
Nick Stenning <nick.stenning@digital.cabinet-office.gov.uk>
Nick Stinemates <nick@stinemates.org>
Nolan Darilek <nolan@thewordnerd.info>
odk- <github@odkurzacz.org>
Pascal Borreli <pascal@borreli.com>
Paul Bowsher <pbowsher@globalpersonals.co.uk>
Paul Hammond <paul@paulhammond.org>
Phil Spitler <pspitler@gmail.com>
Piotr Bogdan <ppbogdan@gmail.com>
pysqz <randomq@126.com>
Ramon van Alteren <ramon@vanalteren.nl>
Renato Riccieri Santos Zannon <renato.riccieri@gmail.com>
Rhys Hiltner <rhys@twitch.tv>
Robert Obryk <robryk@gmail.com>
Roberto Hashioka <roberto_hashioka@hotmail.com>
Ryan Fowler <rwfowler@gmail.com>
Sam Alba <sam.alba@gmail.com>
Sam J Sharpe <sam.sharpe@digital.cabinet-office.gov.uk>
Scott Bessler <scottbessler@gmail.com>
Sean P. Kane <skane@newrelic.com>
Shawn Siefkas <shawn.siefkas@meredith.com>
Shih-Yuan Lee <fourdollars@gmail.com>
Silas Sewell <silas@sewell.org>
Solomon Hykes <solomon@dotcloud.com>
Song Gao <song@gao.io>
Sridatta Thatipamala <sthatipamala@gmail.com>
Sridhar Ratnakumar <sridharr@activestate.com>
Steeve Morin <steeve.morin@gmail.com>
Stefan Praszalowicz <stefan@greplin.com>
Thatcher Peskens <thatcher@dotcloud.com>
Thermionix <bond711@gmail.com>
Thijs Terlouw <thijsterlouw@gmail.com>
Thomas Bikeev <thomas.bikeev@mac.com>
Thomas Frössman <thomasf@jossystem.se>
Thomas Hansen <thomas.hansen@gmail.com>
Tianon Gravi <admwiggin@gmail.com>
Tim Terhorst <mynamewastaken+git@gmail.com>
Tobias Bieniek <Tobias.Bieniek@gmx.de>
Tobias Schmidt <ts@soundcloud.com>
Tobias Schwab <tobias.schwab@dynport.de>
Tom Hulihan <hulihan.tom159@gmail.com>
Tommaso Visconti <tommaso.visconti@gmail.com>
Tyler Brock <tyler.brock@gmail.com>
unclejack <unclejacksons@gmail.com>
Victor Coisne <victor.coisne@dotcloud.com>
Victor Lyuboslavsky <victor@victoreda.com>
Victor Vieux <victor.vieux@dotcloud.com>
Vincent Bernat <bernat@luffy.cx>
Vivek Agarwal <me@vivek.im>
Vladimir Kirillov <proger@wilab.org.ua>
Walter Stanish <walter@pratyeka.org>
Wes Morgan <cap10morgan@gmail.com>
Will Dietz <w@wdtz.org>
Yang Bai <hamo.by@gmail.com>
Zaiste! <oh@zaiste.net>
+514
View File
@@ -0,0 +1,514 @@
# Changelog
## 0.6.5 (2013-10-29)
+ Runtime: Containers can now be named
+ Runtime: Containers can now be linked together for service discovery
+ Runtime: 'run -a', 'start -a' and 'attach' can forward signals to the container for better integration with process supervisors
+ Runtime: Automatically start crashed containers after a reboot
+ Runtime: Expose IP, port, and proto as separate environment vars for container links
* Runtime: Allow ports to be published to specific ips
* Runtime: Prohibit inter-container communication by default
* Documentation: Fix the flags for nc in example
- Client: Only pass stdin to hijack when needed to avoid closed pipe errors
* Testing: Remove warnings and prevent mount issues
* Client: Use less reflection in command-line method invocation
- Runtime: Ignore ErrClosedPipe for stdin in Container.Attach
- Testing: Change logic for tty resize to avoid warning in tests
- Client: Monitor the tty size after starting the container, not prior
- Hack: Update install.sh with $sh_c to get sudo/su for modprobe
- Client: Remove useless os.Exit() calls after log.Fatal
* Hack: Update all the mkimage scripts to use --numeric-owner as a tar argument
* Hack: Update hack/release.sh process to automatically invoke hack/make.sh and bail on build and test issues
+ Hack: Add initial init scripts library and a safer Ubuntu packaging script that works for Debian
- Runtime: Fix untag during removal of images
- Runtime: Remove unused field kernelVersion
* Hack: Add -p option to invoke debootstrap with http_proxy
- Builder: Fix race condition in docker build with verbose output
- Registry: Fix content-type for PushImageJSONIndex method
* Runtime: Fix issue when mounting subdirectories of /mnt in container
* Runtime: Check return value of syscall.Chdir when changing working directory inside dockerinit
* Contrib: Improve helper tools to generate debian and Arch linux server images
## 0.6.4 (2013-10-16)
- Runtime: Add cleanup of container when Start() fails
- Testing: Catch errClosing error when TCP and UDP proxies are terminated
- Testing: Add aggregated docker-ci email report
- Testing: Remove a few errors in tests
* Contrib: Reorganize contributed completion scripts to add zsh completion
* Contrib: Add vim syntax highlighting for Dockerfiles from @honza
* Runtime: Add better comments to utils/stdcopy.go
- Testing: add cleanup to remove leftover containers
* Documentation: Document how to edit and release docs
* Documentation: Add initial draft of the Docker infrastructure doc
* Contrib: Add mkimage-arch.sh
- Builder: Abort build if mergeConfig returns an error and fix duplicate error message
- Runtime: Remove error messages which are not actually errors
* Testing: Only run certain tests with TESTFLAGS='-run TestName' make.sh
* Testing: Prevent docker-ci to test closing PRs
- Documentation: Minor updates to postgresql_service.rst
* Testing: Add nightly release to docker-ci
* Hack: Improve network performance for VirtualBox
* Hack: Add vagrant user to the docker group
* Runtime: Add utils.Errorf for error logging
- Packaging: Remove deprecated packaging directory
* Hack: Revamp install.sh to be usable by more people, and to use official install methods whenever possible (apt repo, portage tree, etc.)
- Hack: Fix contrib/mkimage-debian.sh apt caching prevention
* Documentation: Clarify LGTM process to contributors
- Documentation: Small fixes to parameter names in docs for ADD command
* Runtime: Record termination time in state.
- Registry: Use correct auth config when logging in.
- Documentation: Corrected error in the package name
* Documentation: Document what `vagrant up` is actually doing
- Runtime: Fix `docker rm` with volumes
- Runtime: Use empty string so TempDir uses the OS's temp dir automatically
- Runtime: Make sure to close the network allocators
* Testing: Replace panic by log.Fatal in tests
+ Documentation: improve doc search results
- Runtime: Fix some error cases where a HTTP body might not be closed
* Hack: Add proper bash completion for "docker push"
* Documentation: Add devenvironment link to CONTRIBUTING.md
* Documentation: Cleanup whitespace in API 1.5 docs
* Documentation: use angle brackets in MAINTAINER example email
- Testing: Increase TestRunDetach timeout
* Documentation: Fix help text for -v option
+ Hack: Added Dockerfile.tmLanguage to contrib
+ Runtime: Autorestart containers by default
* Testing: Adding more tests around auth.ResolveAuthConfig
* Hack: Configured FPM to make /etc/init/docker.conf a config file
* Hack: Add xz utils as a runtime dep
* Documentation: Add `apt-get install curl` to Ubuntu docs
* Documentation: Remove Gentoo install notes about #1422 workaround
* Documentation: Fix Ping endpoint documentation
* Runtime: Bump vendor kr/pty to commit 3b1f6487b (syscall.O_NOCTTY)
* Runtime: lxc: Allow set_file_cap capability in container
* Documentation: Update archlinux.rst
- Documentation: Fix ironic typo in changelog
* Documentation: Add explanation for export restrictions
* Hack: Add cleanup/refactor portion of #2010 for hack and Dockerfile updates
+ Documentation: Changes to a new style for the docs. Includes version switcher.
* Documentation: Formatting, add information about multiline json
+ Hack: Add contrib/mkimage-centos.sh back (from #1621), and associated documentation link
- Runtime: Fix panic with wrong dockercfg file
- Runtime: Fix the attach behavior with -i
* Documentation: Add .dockercfg doc
- Runtime: Move run -rm to the cli only
* Hack: Enable SSH Agent forwarding in Vagrant VM
+ Runtime: Add -rm to docker run for removing a container on exit
* Documentation: Improve registry and index REST API documentation
* Runtime: Split stdout stderr
- Documentation: Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3
* Documentation: Update Gentoo installation documentation now that we're in the portage tree proper
- Registry: Fix the error message so it is the same as the regex
* Runtime: Always create a new session for the container
* Hack: Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly
* Documentation: Various command fixes in postgres example
* Documentation: Cleanup and reorganize docs and tooling for contributors and maintainers
- Documentation: Minor spelling correction of protocoll -> protocol
* Hack: Several small tweaks/fixes for contrib/mkimage-debian.sh
+ Hack: Add @tianon to hack/MAINTAINERS
## 0.6.3 (2013-09-23)
* Packaging: Update tar vendor dependency
- Client: Fix detach issue
- Runtime: Only copy and change permissions on non-bindmount volumes
- Registry: Update regular expression to match index
* Runtime: Allow multiple volumes-from
* Packaging: Download apt key over HTTPS
* Documentation: Update section on extracting the docker binary after build
* Documentation: Update development environment docs for new build process
* Documentation: Remove 'base' image from documentation
* Packaging: Add 'docker' group on install for ubuntu package
- Runtime: Fix HTTP imports from STDIN
## 0.6.2 (2013-09-17)
+ Hack: Vendor all dependencies
+ Builder: Add -rm option in order to remove intermediate containers
+ Runtime: Add domainname support
+ Runtime: Implement image filtering with path.Match
* Builder: Allow multiline for the RUN instruction
* Runtime: Remove unnecesasry warnings
* Runtime: Only mount the hostname file when the config exists
* Runtime: Handle signals within the `docker login` command
* Runtime: Remove os/user dependency
* Registry: Implement login with private registry
* Remote API: Bump to v1.5
* Packaging: Break down hack/make.sh into small scripts, one per 'bundle': test, binary, ubuntu etc.
* Documentation: General improvements
- Runtime: UID and GID are now also applied to volumes
- Runtime: `docker start` set error code upon error
- Runtime: `docker run` set the same error code as the process started
- Registry: Fix push issues
## 0.6.1 (2013-08-23)
* Registry: Pass "meta" headers in API calls to the registry
- Packaging: Use correct upstart script with new build tool
- Packaging: Use libffi-dev, don't build it from sources
- Packaging: Removed duplicate mercurial install command
## 0.6.0 (2013-08-22)
- Runtime: Load authConfig only when needed and fix useless WARNING
+ Runtime: Add lxc-conf flag to allow custom lxc options
- Runtime: Fix race conditions in parallel pull
- Runtime: Improve CMD, ENTRYPOINT, and attach docs.
* Documentation: Small fix to docs regarding adding docker groups
* Documentation: Add MongoDB image example
+ Builder: Add USER instruction do Dockerfile
* Documentation: updated default -H docs
* Remote API: Sort Images by most recent creation date.
+ Builder: Add workdir support for the Buildfile
+ Runtime: Add an option to set the working directory
- Runtime: Show tag used when image is missing
* Documentation: Update readme with dependencies for building
* Documentation: Add instructions for creating and using the docker group
* Remote API: Reworking opaque requests in registry module
- Runtime: Fix Graph ByParent() to generate list of child images per parent image.
* Runtime: Add Image name to LogEvent tests
* Documentation: Add sudo to examples and installation to documentation
+ Hack: Bash Completion: Limit commands to containers of a relevant state
* Remote API: Add image name in /events
* Runtime: Apply volumes-from before creating volumes
- Runtime: Make docker run handle SIGINT/SIGTERM
- Runtime: Prevent crash when .dockercfg not readable
* Hack: Add docker dependencies coverage testing into docker-ci
+ Runtime: Add -privileged flag and relevant tests, docs, and examples
+ Packaging: Docker-brew 0.5.2 support and memory footprint reduction
- Runtime: Install script should be fetched over https, not http.
* Packaging: Add new docker dependencies into docker-ci
* Runtime: Use Go 1.1.2 for dockerbuilder
* Registry: Improve auth push
* Runtime: API, issue 1471: Use groups for socket permissions
* Documentation: PostgreSQL service example in documentation
* Contrib: bash completion script
* Tests: Improve TestKillDifferentUser to prevent timeout on buildbot
* Documentation: Fix typo in docs for docker run -dns
* Documentation: Adding a reference to ps -a
- Runtime: Correctly detect IPv4 forwarding
- Packaging: Revert "docker.upstart: avoid spawning a `sh` process"
* Runtime: Use ranged for loop on channels
- Runtime: Fix typo: fmt.Sprint -> fmt.Sprintf
- Tests: Fix typo in TestBindMounts (runContainer called without image)
* Runtime: add websocket support to /container/<name>/attach/ws
* Runtime: Mount /dev/shm as a tmpfs
- Builder: Only count known instructions as build steps
- Builder: Fix docker build and docker events output
- Runtime: switch from http to https for get.docker.io
* Tests: Improve TestGetContainersTop so it does not rely on sleep
+ Packaging: Docker-brew and Docker standard library
* Testing: Add some tests in server and utils
+ Packaging: Release docker with docker
- Builder: Make sure ENV instruction within build perform a commit each time
* Packaging: Fix the upstart script generated by get.docker.io
- Runtime: fix small \n error un docker build
* Runtime: Let userland proxy handle container-bound traffic
* Runtime: Updated the Docker CLI to specify a value for the "Host" header.
* Runtime: Add warning when net.ipv4.ip_forwarding = 0
* Registry: Registry unit tests + mock registry
* Runtime: fixed #910. print user name to docker info output
- Builder: Forbid certain paths within docker build ADD
- Runtime: change network range to avoid conflict with EC2 DNS
* Tests: Relax the lo interface test to allow iface index != 1
* Documentation: Suggest installing linux-headers by default.
* Documentation: Change the twitter handle
* Client: Add docker cp command and copy api endpoint to copy container files/folders to the host
* Remote API: Use mime pkg to parse Content-Type
- Runtime: Reduce connect and read timeout when pinging the registry
* Documentation: Update amazon.rst to explain that Vagrant is not necessary for running Docker on ec2
* Packaging: Enabled the docs to generate manpages.
* Runtime: Parallel pull
- Runtime: Handle ip route showing mask-less IP addresses
* Documentation: Clarify Amazon EC2 installation
* Documentation: 'Base' image is deprecated and should no longer be referenced in the docs.
* Runtime: Fix to "Inject dockerinit at /.dockerinit"
* Runtime: Allow ENTRYPOINT without CMD
- Runtime: Always consider localhost as a domain name when parsing the FQN repos name
* Remote API: 650 http utils and user agent field
* Documentation: fix a typo in the ubuntu installation guide
- Builder: Repository name (and optionally a tag) in build usage
* Documentation: Move note about officially supported kernel
* Packaging: Revert "Bind daemon to 0.0.0.0 in Vagrant.
* Builder: Add no cache for docker build
* Runtime: Add hostname to environment
* Runtime: Add last stable version in `docker version`
- Builder: Make sure ADD will create everything in 0755
* Documentation: Add ufw doc
* Tests: Add registry functional test to docker-ci
- Documentation: Solved the logo being squished in Safari
- Runtime: Use utils.ParseRepositoryTag instead of strings.Split(name, ":") in server.ImageDelete
* Runtime: Refactor checksum
- Runtime: Improve connect message with socket error
* Documentation: Added information about Docker's high level tools over LXC.
* Don't read from stdout when only attached to stdin
## 0.5.3 (2013-08-13)
* Runtime: Use docker group for socket permissions
- Runtime: Spawn shell within upstart script
- Builder: Make sure ENV instruction within build perform a commit each time
- Runtime: Handle ip route showing mask-less IP addresses
- Runtime: Add hostname to environment
## 0.5.2 (2013-08-08)
* Builder: Forbid certain paths within docker build ADD
- Runtime: Change network range to avoid conflict with EC2 DNS
* API: Change daemon to listen on unix socket by default
## 0.5.1 (2013-07-30)
+ API: Docker client now sets useragent (RFC 2616)
+ Runtime: Add `ps` args to `docker top`
+ Runtime: Add support for container ID files (pidfile like)
+ Runtime: Add container=lxc in default env
+ Runtime: Support networkless containers with `docker run -n` and `docker -d -b=none`
+ API: Add /events endpoint
+ Builder: ADD command now understands URLs
+ Builder: CmdAdd and CmdEnv now respect Dockerfile-set ENV variables
* Hack: Simplify unit tests with helpers
* Hack: Improve docker.upstart event
* Hack: Add coverage testing into docker-ci
* Runtime: Stdout/stderr logs are now stored in the same file as JSON
* Runtime: Allocate a /16 IP range by default, with fallback to /24. Try 12 ranges instead of 3.
* Runtime: Change .dockercfg format to json and support multiple auth remote
- Runtime: Do not override volumes from config
- Runtime: Fix issue with EXPOSE override
- Builder: Create directories with 755 instead of 700 within ADD instruction
## 0.5.0 (2013-07-17)
+ Runtime: List all processes running inside a container with 'docker top'
+ Runtime: Host directories can be mounted as volumes with 'docker run -v'
+ Runtime: Containers can expose public UDP ports (eg, '-p 123/udp')
+ Runtime: Optionally specify an exact public port (eg. '-p 80:4500')
+ Registry: New image naming scheme inspired by Go packaging convention allows arbitrary combinations of registries
+ Builder: ENTRYPOINT instruction sets a default binary entry point to a container
+ Builder: VOLUME instruction marks a part of the container as persistent data
* Builder: 'docker build' displays the full output of a build by default
* Runtime: 'docker login' supports additional options
- Runtime: Dont save a container's hostname when committing an image.
- Registry: Fix issues when uploading images to a private registry
## 0.4.8 (2013-07-01)
+ Builder: New build operation ENTRYPOINT adds an executable entry point to the container.
- Runtime: Fix a bug which caused 'docker run -d' to no longer print the container ID.
- Tests: Fix issues in the test suite
## 0.4.7 (2013-06-28)
* Registry: easier push/pull to a custom registry
* Remote API: the progress bar updates faster when downloading and uploading large files
- Remote API: fix a bug in the optional unix socket transport
* Runtime: improve detection of kernel version
+ Runtime: host directories can be mounted as volumes with 'docker run -b'
- Runtime: fix an issue when only attaching to stdin
* Runtime: use 'tar --numeric-owner' to avoid uid mismatch across multiple hosts
* Hack: improve test suite and dev environment
* Hack: remove dependency on unit tests on 'os/user'
+ Documentation: add terminology section
## 0.4.6 (2013-06-22)
- Runtime: fix a bug which caused creation of empty images (and volumes) to crash.
## 0.4.5 (2013-06-21)
+ Builder: 'docker build git://URL' fetches and builds a remote git repository
* Runtime: 'docker ps -s' optionally prints container size
* Tests: Improved and simplified
- Runtime: fix a regression introduced in 0.4.3 which caused the logs command to fail.
- Builder: fix a regression when using ADD with single regular file.
## 0.4.4 (2013-06-19)
- Builder: fix a regression introduced in 0.4.3 which caused builds to fail on new clients.
## 0.4.3 (2013-06-19)
+ Builder: ADD of a local file will detect tar archives and unpack them
* Runtime: Remove bsdtar dependency
* Runtime: Add unix socket and multiple -H support
* Runtime: Prevent rm of running containers
* Runtime: Use go1.1 cookiejar
* Builder: ADD improvements: use tar for copy + automatically unpack local archives
* Builder: ADD uses tar/untar for copies instead of calling 'cp -ar'
* Builder: nicer output for 'docker build'
* Builder: fixed the behavior of ADD to be (mostly) reverse-compatible, predictable and well-documented.
* Client: HumanReadable ProgressBar sizes in pull
* Client: Fix docker version's git commit output
* API: Send all tags on History API call
* API: Add tag lookup to history command. Fixes #882
- Runtime: Fix issue detaching from running TTY container
- Runtime: Forbid parralel push/pull for a single image/repo. Fixes #311
- Runtime: Fix race condition within Run command when attaching.
- Builder: fix a bug which caused builds to fail if ADD was the first command
- Documentation: fix missing command in irc bouncer example
## 0.4.2 (2013-06-17)
- Packaging: Bumped version to work around an Ubuntu bug
## 0.4.1 (2013-06-17)
+ Remote Api: Add flag to enable cross domain requests
+ Remote Api/Client: Add images and containers sizes in docker ps and docker images
+ Runtime: Configure dns configuration host-wide with 'docker -d -dns'
+ Runtime: Detect faulty DNS configuration and replace it with a public default
+ Runtime: allow docker run <name>:<id>
+ Runtime: you can now specify public port (ex: -p 80:4500)
* Client: allow multiple params in inspect
* Client: Print the container id before the hijack in `docker run`
* Registry: add regexp check on repo's name
* Registry: Move auth to the client
* Runtime: improved image removal to garbage-collect unreferenced parents
* Vagrantfile: Add the rest api port to vagrantfile's port_forward
* Upgrade to Go 1.1
- Builder: don't ignore last line in Dockerfile when it doesn't end with \n
- Registry: Remove login check on pull
## 0.4.0 (2013-06-03)
+ Introducing Builder: 'docker build' builds a container, layer by layer, from a source repository containing a Dockerfile
+ Introducing Remote API: control Docker programmatically using a simple HTTP/json API
* Runtime: various reliability and usability improvements
## 0.3.4 (2013-05-30)
+ Builder: 'docker build' builds a container, layer by layer, from a source repository containing a Dockerfile
+ Builder: 'docker build -t FOO' applies the tag FOO to the newly built container.
+ Runtime: interactive TTYs correctly handle window resize
* Runtime: fix how configuration is merged between layers
+ Remote API: split stdout and stderr on 'docker run'
+ Remote API: optionally listen on a different IP and port (use at your own risk)
* Documentation: improved install instructions.
## 0.3.3 (2013-05-23)
- Registry: Fix push regression
- Various bugfixes
## 0.3.2 (2013-05-09)
* Runtime: Store the actual archive on commit
* Registry: Improve the checksum process
* Registry: Use the size to have a good progress bar while pushing
* Registry: Use the actual archive if it exists in order to speed up the push
- Registry: Fix error 400 on push
## 0.3.1 (2013-05-08)
+ Builder: Implement the autorun capability within docker builder
+ Builder: Add caching to docker builder
+ Builder: Add support for docker builder with native API as top level command
+ Runtime: Add go version to debug infos
+ Builder: Implement ENV within docker builder
+ Registry: Add docker search top level command in order to search a repository
+ Images: output graph of images to dot (graphviz)
+ Documentation: new introduction and high-level overview
+ Documentation: Add the documentation for docker builder
+ Website: new high-level overview
- Makefile: Swap "go get" for "go get -d", especially to compile on go1.1rc
- Images: fix ByParent function
- Builder: Check the command existance prior create and add Unit tests for the case
- Registry: Fix pull for official images with specific tag
- Registry: Fix issue when login in with a different user and trying to push
- Documentation: CSS fix for docker documentation to make REST API docs look better.
- Documentation: Fixed CouchDB example page header mistake
- Documentation: fixed README formatting
* Registry: Improve checksum - async calculation
* Runtime: kernel version - don't show the dash if flavor is empty
* Documentation: updated www.docker.io website.
* Builder: use any whitespaces instead of tabs
* Packaging: packaging ubuntu; issue #510: Use goland-stable PPA package to build docker
## 0.3.0 (2013-05-06)
+ Registry: Implement the new registry
+ Documentation: new example: sharing data between 2 couchdb databases
- Runtime: Fix the command existance check
- Runtime: strings.Split may return an empty string on no match
- Runtime: Fix an index out of range crash if cgroup memory is not
* Documentation: Various improvments
* Vagrant: Use only one deb line in /etc/apt
## 0.2.2 (2013-05-03)
+ Support for data volumes ('docker run -v=PATH')
+ Share data volumes between containers ('docker run -volumes-from')
+ Improved documentation
* Upgrade to Go 1.0.3
* Various upgrades to the dev environment for contributors
## 0.2.1 (2013-05-01)
+ 'docker commit -run' bundles a layer with default runtime options: command, ports etc.
* Improve install process on Vagrant
+ New Dockerfile operation: "maintainer"
+ New Dockerfile operation: "expose"
+ New Dockerfile operation: "cmd"
+ Contrib script to build a Debian base layer
+ 'docker -d -r': restart crashed containers at daemon startup
* Runtime: improve test coverage
## 0.2.0 (2013-04-23)
- Runtime: ghost containers can be killed and waited for
* Documentation: update install intructions
- Packaging: fix Vagrantfile
- Development: automate releasing binaries and ubuntu packages
+ Add a changelog
- Various bugfixes
## 0.1.8 (2013-04-22)
- Dynamically detect cgroup capabilities
- Issue stability warning on kernels <3.8
- 'docker push' buffers on disk instead of memory
- Fix 'docker diff' for removed files
- Fix 'docker stop' for ghost containers
- Fix handling of pidfile
- Various bugfixes and stability improvements
## 0.1.7 (2013-04-18)
- Container ports are available on localhost
- 'docker ps' shows allocated TCP ports
- Contributors can run 'make hack' to start a continuous integration VM
- Streamline ubuntu packaging & uploading
- Various bugfixes and stability improvements
## 0.1.6 (2013-04-17)
- Record the author an image with 'docker commit -author'
## 0.1.5 (2013-04-17)
- Disable standalone mode
- Use a custom DNS resolver with 'docker -d -dns'
- Detect ghost containers
- Improve diagnosis of missing system capabilities
- Allow disabling memory limits at compile time
- Add debian packaging
- Documentation: installing on Arch Linux
- Documentation: running Redis on docker
- Fixed lxc 0.9 compatibility
- Automatically load aufs module
- Various bugfixes and stability improvements
## 0.1.4 (2013-04-09)
- Full support for TTY emulation
- Detach from a TTY session with the escape sequence `C-p C-q`
- Various bugfixes and stability improvements
- Minor UI improvements
- Automatically create our own bridge interface 'docker0'
## 0.1.3 (2013-04-04)
- Choose TCP frontend port with '-p :PORT'
- Layer format is versioned
- Major reliability improvements to the process manager
- Various bugfixes and stability improvements
## 0.1.2 (2013-04-03)
- Set container hostname with 'docker run -h'
- Selective attach at run with 'docker run -a [stdin[,stdout[,stderr]]]'
- Various bugfixes and stability improvements
- UI polish
- Progress bar on push/pull
- Use XZ compression by default
- Make IP allocator lazy
## 0.1.1 (2013-03-31)
- Display shorthand IDs for convenience
- Stabilize process management
- Layers can include a commit message
- Simplified 'docker attach'
- Fixed support for re-attaching
- Various bugfixes and stability improvements
- Auto-download at run
- Auto-login on push
- Beefed up documentation
## 0.1.0 (2013-03-23)
- First release
- Implement registry in order to push/pull images
- TCP port allocation
- Fix termcaps on Linux
- Add documentation
- Add Vagrant support with Vagrantfile
- Add unit tests
- Add repository/tags to ease image management
- Improve the layer implementation
+118
View File
@@ -0,0 +1,118 @@
# Contributing to Docker
Want to hack on Docker? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels
wrong or incomplete.
## Build Environment
For instructions on setting up your development environment, please see our dedicated [dev environment setup docs](http://docs.docker.io/en/latest/contributing/devenvironment/).
## Contribution guidelines
### Pull requests are always welcome
We are always thrilled to receive pull requests, and do our best to
process them as fast as possible. Not sure if that typo is worth a pull
request? Do it! We will appreciate it.
If your pull request is not accepted on the first try, don't be
discouraged! If there's a problem with the implementation, hopefully you
received feedback on what to improve.
We're trying very hard to keep Docker lean and focused. We don't want it
to do everything for everybody. This means that we might decide against
incorporating a new feature. However, there might be a way to implement
that feature *on top of* docker.
### Discuss your design on the mailing list
We recommend discussing your plans [on the mailing
list](https://groups.google.com/forum/?fromgroups#!forum/docker-dev)
before starting to code - especially for more ambitious contributions.
This gives other contributors a chance to point you in the right
direction, give feedback on your design, and maybe point out if someone
else is working on the same thing.
### Create issues...
Any significant improvement should be documented as [a github
issue](https://github.com/dotcloud/docker/issues) before anybody
starts working on it.
### ...but check for existing issues first!
Please take a moment to check that an issue doesn't already exist
documenting your bug report or improvement proposal. If it does, it
never hurts to add a quick "+1" or "I have this problem too". This will
help prioritize the most common problems and requests.
### Conventions
Fork the repo and make changes on your fork in a feature branch:
- If it's a bugfix branch, name it XXX-something where XXX is the number of the
issue
- If it's a feature branch, create an enhancement issue to announce your
intentions, and name it XXX-something where XXX is the number of the issue.
Submit unit tests for your changes. Go has a great test framework built in; use
it! Take a look at existing tests for inspiration. Run the full test suite on
your branch before submitting a pull request.
Update the documentation when creating or modifying features. Test
your documentation changes for clarity, concision, and correctness, as
well as a clean docmuent build. See ``docs/README.md`` for more
information on building the docs and how docs get released.
Write clean code. Universally formatted code promotes ease of writing, reading,
and maintenance. Always run `go fmt` before committing your changes. Most
editors have plugins that do this automatically, and there's also a git
pre-commit hook:
```
curl -o .git/hooks/pre-commit https://raw.github.com/edsrzf/gofmt-git-hook/master/fmt-check && chmod +x .git/hooks/pre-commit
```
Pull requests descriptions should be as clear as possible and include a
reference to all the issues that they address.
Code review comments may be added to your pull request. Discuss, then make the
suggested modifications and push additional commits to your feature branch. Be
sure to post a comment after pushing. The new commits will show up in the pull
request automatically, but the reviewers will not be notified unless you
comment.
Before the pull request is merged, make sure that you squash your commits into
logical units of work using `git rebase -i` and `git push -f`. After every
commit the test suite should be passing. Include documentation changes in the
same commit so that a revert would remove all traces of the feature or fix.
Commits that fix or close an issue should include a reference like `Closes #XXX`
or `Fixes #XXX`, which will automatically close the issue when merged.
Add your name to the AUTHORS file, but make sure the list is sorted and your
name and email address match your git configuration. The AUTHORS file is
regenerated occasionally from the git commit history, so a mismatch may result
in your changes being overwritten.
### Approval
Docker maintainers use LGTM (looks good to me) in comments on the code review
to indicate acceptance.
A change requires LGTMs from an absolute majority of the maintainers of each
component affected. For example, if a change affects docs/ and registry/, it
needs an absolute majority from the maintainers of docs/ AND, separately, an
absolute majority of the maintainers of registry
For more details see [MAINTAINERS.md](hack/MAINTAINERS.md)
### How can I become a maintainer?
* Step 1: learn the component inside out
* Step 2: make yourself useful by contributing code, bugfixes, support etc.
* Step 3: volunteer on the irc channel (#docker@freenode)
Don't forget: being a maintainer is a time investment. Make sure you will have time to make yourself available.
You don't have to be a maintainer to make a difference on the project!
+67
View File
@@ -0,0 +1,67 @@
# This file describes the standard way to build Docker, using docker
#
# Usage:
#
# # Assemble the full dev environment. This is slow the first time.
# docker build -t docker .
# # Apparmor messes with privileged mode: disable it
# /etc/init.d/apparmor stop ; /etc/init.d/apparmor teardown
#
# # Mount your source in an interactive container for quick testing:
# docker run -v `pwd`:/go/src/github.com/dotcloud/docker -privileged -lxc-conf=lxc.aa_profile=unconfined -i -t docker bash
#
#
# # Run the test suite:
# docker run -privileged -lxc-conf=lxc.aa_profile=unconfined docker hack/make.sh test
#
# # Publish a release:
# docker run -privileged -lxc-conf=lxc.aa_profile=unconfined \
# -e AWS_S3_BUCKET=baz \
# -e AWS_ACCESS_KEY=foo \
# -e AWS_SECRET_KEY=bar \
# -e GPG_PASSPHRASE=gloubiboulga \
# docker hack/release.sh
#
docker-version 0.6.1
from ubuntu:12.04
maintainer Solomon Hykes <solomon@dotcloud.com>
# Build dependencies
run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
run apt-get update
run apt-get install -y -q curl
run apt-get install -y -q git
run apt-get install -y -q mercurial
run apt-get install -y -q build-essential libsqlite3-dev
# Install Go
run curl -s https://go.googlecode.com/files/go1.2rc2.src.tar.gz | tar -v -C /usr/local -xz
env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
env GOPATH /go:/go/src/github.com/dotcloud/docker/vendor
run cd /usr/local/go/src && ./make.bash && go install -ldflags '-w -linkmode external -extldflags "-static -Wl,--unresolved-symbols=ignore-in-shared-libs"' -tags netgo -a std
# Ubuntu stuff
run apt-get install -y -q ruby1.9.3 rubygems libffi-dev
run gem install --no-rdoc --no-ri fpm
run apt-get install -y -q reprepro dpkg-sig
# Install s3cmd 1.0.1 (earlier versions don't support env variables in the config)
run apt-get install -y -q python-pip
run pip install s3cmd
run pip install python-magic
run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg
# Runtime dependencies
run apt-get install -y -q iptables
run apt-get install -y -q lxc
run apt-get install -y -q aufs-tools
volume /var/lib/docker
workdir /go/src/github.com/dotcloud/docker
# Wrap all commands in the "docker-in-docker" script to allow nested containers
entrypoint ["hack/dind"]
# Upload docker source
add . /go/src/github.com/dotcloud/docker
+30
View File
@@ -0,0 +1,30 @@
## FIXME
This file is a loose collection of things to improve in the codebase, for the internal
use of the maintainers.
They are not big enough to be in the roadmap, not user-facing enough to be github issues,
and not important enough to be discussed in the mailing list.
They are just like FIXME comments in the source code, except we're not sure where in the source
to put them - so we put them here :)
* Merge Runtime, Server and Builder into Runtime
* Run linter on codebase
* Unify build commands and regular commands
* Move source code into src/ subdir for clarity
* docker build: on non-existent local path for ADD, don't show full absolute path on the host
* docker tag foo REPO:TAG
* use size header for progress bar in pull
* Clean up context upload in build!!!
* Parallel pull
* Always generate a resolv.conf per container, to avoid changing resolv.conf under thne container's feet
* Save metadata with import/export (#1974)
* Upgrade dockerd without stopping containers
* Simple command to remove all untagged images (`docker rmi $(docker images | awk '/^<none>/ { print $3 }')`)
* Simple command to clean up containers for disk space
* Caching after an ADD (#880)
* Clean up the ProgressReader api, it's a PITA to use
* Use netlink instead of iproute2/iptables (#925)
+6
View File
@@ -0,0 +1,6 @@
Solomon Hykes <solomon@dotcloud.com> (@shykes)
Guillaume Charmes <guillaume@dotcloud.com> (@creack)
Victor Vieux <victor@dotcloud.com> (@vieux)
Michael Crosby <michael@crosbymichael.com> (@crosbymichael)
api.go: Victor Vieux <victor@dotcloud.com> (@vieux)
Vagrantfile: Daniel Mizyrycki <daniel@dotcloud.com> (@mzdaniel)
-83
View File
@@ -1,83 +0,0 @@
PKG_NAME=dotcloud-docker
PKG_ARCH=amd64
PKG_VERSION=1
ROOT_PATH:=$(PWD)
BUILD_PATH=build # Do not change, decided by dpkg-buildpackage
BUILD_SRC=build_src
GITHUB_PATH=src/github.com/dotcloud/docker
INSDIR=usr/bin
SOURCE_PACKAGE=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
DEB_PACKAGE=$(PKG_NAME)_$(PKG_VERSION)_$(PKG_ARCH).deb
EXTRA_GO_PKG=fs auth
TMPDIR=$(shell mktemp -d -t XXXXXX)
# Build a debian source package
all: clean build_in_deb
build_in_deb:
echo "GOPATH = " $(ROOT_PATH)
mkdir bin
cd $(GITHUB_PATH)/docker; GOPATH=$(ROOT_PATH) go build -o $(ROOT_PATH)/bin/docker
# DESTDIR provided by Debian packaging
install:
# Call this from a go environment (as packaged for deb source package)
mkdir -p $(DESTDIR)/$(INSDIR)
mkdir -p $(DESTDIR)/etc/init
install -m 0755 bin/docker $(DESTDIR)/$(INSDIR)
install -o root -m 0755 etc/docker.upstart $(DESTDIR)/etc/init/docker.conf
$(BUILD_SRC): clean
# Copy ourselves into $BUILD_SRC to comply with unusual golang constraints
tar --exclude=*.tar.gz --exclude=checkout.tgz -f checkout.tgz -cz *
mkdir -p $(BUILD_SRC)/$(GITHUB_PATH)
tar -f checkout.tgz -C $(BUILD_SRC)/$(GITHUB_PATH) -xz
cd $(BUILD_SRC)/$(GITHUB_PATH)/docker; GOPATH=$(ROOT_PATH)/$(BUILD_SRC) go get -d
for d in `find $(BUILD_SRC) -name '.git*'`; do rm -rf $$d; done
# Populate source build with debian stuff
cp -R -L ./deb/* $(BUILD_SRC)
$(SOURCE_PACKAGE): $(BUILD_SRC)
rm -f $(SOURCE_PACKAGE)
# Create the debian source package
tar -f $(SOURCE_PACKAGE) -C ${ROOT_PATH}/${BUILD_SRC} -cz .
# Build deb package fetching go dependencies and cleaning up git repositories
deb: $(DEB_PACKAGE)
$(DEB_PACKAGE): $(SOURCE_PACKAGE)
# dpkg-buildpackage looks for source package tarball in ../
cd $(BUILD_SRC); dpkg-buildpackage
rm -rf $(BUILD_PATH) debian/$(PKG_NAME)* debian/files
debsrc: $(SOURCE_PACKAGE)
# Build local sources
#$(PKG_NAME): build_local
build_local:
-@mkdir -p bin
cd docker && go build -o ../bin/docker
gotest:
@echo "\033[36m[Testing]\033[00m docker..."
@sudo -E GOPATH=$(ROOT_PATH)/$(BUILD_SRC) go test -v && \
echo -n "\033[32m[OK]\033[00m" || \
echo -n "\033[31m[FAIL]\033[00m"; \
echo " docker"
@echo "Testing extra repos {$(EXTRA_GO_PKG)}"
@for package in $(EXTRA_GO_PKG); do \
echo "\033[36m[Testing]\033[00m docker/$$package..." && \
cd $$package ; \
sudo -E GOPATH=$(ROOT_PATH)/$(BUILD_SRC) go test -v && \
echo -n "\033[32m[OK]\033[00m" || \
echo -n "\033[31m[FAIL]\033[00m" ; \
echo " docker/$$package" ; \
cd .. ;\
done
@sudo rm -rf /tmp/docker-*
clean:
rm -rf $(BUILD_PATH) debian/$(PKG_NAME)* debian/files $(BUILD_SRC) checkout.tgz bin
+39 -3
View File
@@ -1,6 +1,42 @@
Docker
Copyright 2012-2013 dotCloud, inc.
Copyright 2012-2013 Docker, Inc.
This product includes software developed at dotCloud, inc. (http://www.dotcloud.com).
This product includes software developed at Docker, Inc. (http://www.docker.com).
This product contains software (https://github.com/kr/pty) developed by Keith Rarick, licensed under the MIT License.
This product contains software (https://github.com/kr/pty) developed
by Keith Rarick, licensed under the MIT License.
The following is courtesy of our legal counsel:
Transfers of Docker shall be in accordance with applicable export
controls of any country and all other applicable legal requirements.
Docker shall not be distributed or downloaded to or in Cuba, Iran,
North Korea, Sudan or Syria and shall not be distributed or downloaded
to any person on the Denied Persons List administered by the U.S.
Department of Commerce.
What does that mean?
Here is a further explanation from our legal counsel:
Like all software products that utilize cryptography, the export and
use of Docker is subject to the U.S. Commerce Department's Export
Administration Regulations (EAR) because it uses or contains
cryptography (see
http://www.bis.doc.gov/index.php/policy-guidance/encryption). Certain
free and open source software projects have a lightweight set of
requirements, which can generally be met by providing email notice to
the appropriate U.S. government agencies that their source code is
available on a publicly available repository and making the
appropriate statements in the README.
The restrictions of the EAR apply to certain denied locations
(currently Iran, Sudan, Syria, North Korea, or Cuba) and those
individuals on the Denied Persons List, which is available here:
http://www.bis.doc.gov/index.php/policy-guidance/lists-of-parties-of-concern/denied-persons-list.
If you are incorporating Docker into a new open source project, the
EAR restrictions apply to your incorporation of Docker into your
project in the same manner as other cryptography-enabled projects,
such as OpenSSL, almost all Linux distributions, etc.
For more information, see http://www.apache.org/dev/crypto.html and/or
seek legal counsel.
+168 -281
View File
@@ -1,315 +1,202 @@
Docker: the Linux container runtime
===================================
Docker: the Linux container engine
==================================
Docker complements LXC with a high-level API with operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers.
Docker is an open source project to pack, ship and run any application
as a lightweight container
Is is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc.
Docker containers are both *hardware-agnostic* and
*platform-agnostic*. This means that they can run anywhere, from your
laptop to the largest EC2 compute instance and everything in between -
and they don't require that you use a particular language, framework
or packaging system. That makes them great building blocks for
deploying and scaling web apps, databases and backend services without
depending on a particular stack or provider.
<img src="http://bricks.argz.com/bricksfiles/lego/07000/7823/012.jpg"/>
Docker is an open-source implementation of the deployment engine which
powers [dotCloud](http://dotcloud.com), a popular
Platform-as-a-Service. It benefits directly from the experience
accumulated over several years of large-scale operation and support of
hundreds of thousands of applications and databases.
* *Heterogeneous payloads*: any combination of binaries, libraries, configuration files, scripts, virtualenvs, jars, gems, tarballs, you name it. No more juggling between domain-specific tools. Docker can deploy and run them all.
![Docker L](docs/theme/docker/static/img/dockerlogo-h.png "Docker")
* *Any server*: docker can run on any x64 machine with a modern linux kernel - whether it's a laptop, a bare metal server or a VM. This makes it perfect for multi-cloud deployments.
## Better than VMs
* *Isolation*: docker isolates processes from each other and from the underlying host, using lightweight containers.
A common method for distributing applications and sandbox their
execution is to use virtual machines, or VMs. Typical VM formats are
VMWare's vmdk, Oracle Virtualbox's vdi, and Amazon EC2's ami. In
theory these formats should allow every developer to automatically
package their application into a "machine" for easy distribution and
deployment. In practice, that almost never happens, for a few reasons:
* *Repeatability*: because containers are isolated in their own filesystem, they behave the same regardless of where, when, and alongside what they run.
* *Size*: VMs are very large which makes them impractical to store
and transfer.
* *Performance*: running VMs consumes significant CPU and memory,
which makes them impractical in many scenarios, for example local
development of multi-tier applications, and large-scale deployment
of cpu and memory-intensive applications on large numbers of
machines.
* *Portability*: competing VM environments don't play well with each
other. Although conversion tools do exist, they are limited and
add even more overhead.
* *Hardware-centric*: VMs were designed with machine operators in
mind, not software developers. As a result, they offer very
limited tooling for what developers need most: building, testing
and running their software. For example, VMs offer no facilities
for application versioning, monitoring, configuration, logging or
service discovery.
By contrast, Docker relies on a different sandboxing method known as
*containerization*. Unlike traditional virtualization,
containerization takes place at the kernel level. Most modern
operating system kernels now support the primitives necessary for
containerization, including Linux with [openvz](http://openvz.org),
[vserver](http://linux-vserver.org) and more recently
[lxc](http://lxc.sourceforge.net), Solaris with
[zones](http://docs.oracle.com/cd/E26502_01/html/E29024/preface-1.html#scrolltoc)
and FreeBSD with
[Jails](http://www.freebsd.org/doc/handbook/jails.html).
Docker builds on top of these low-level primitives to offer developers
a portable format and runtime environment that solves all 4
problems. Docker containers are small (and their transfer can be
optimized with layers), they have basically zero memory and cpu
overhead, they are completely portable and are designed from the
ground up with an application-centric design.
The best part: because ``docker`` operates at the OS level, it can
still be run inside a VM!
## Plays well with others
Docker does not require that you buy into a particular programming
language, framework, packaging system or configuration language.
Is your application a Unix process? Does it use files, tcp
connections, environment variables, standard Unix streams and
command-line arguments as inputs and outputs? Then ``docker`` can run
it.
Can your application's build be expressed as a sequence of such
commands? Then ``docker`` can build it.
Notable features
-----------------
## Escape dependency hell
* Filesystem isolation: each process container runs in a completely separate root filesystem.
A common problem for developers is the difficulty of managing all
their application's dependencies in a simple and automated way.
* Resource isolation: system resources like cpu and memory can be allocated differently to each process container, using cgroups.
This is usually difficult for several reasons:
* Network isolation: each process container runs in its own network namespace, with a virtual interface and IP address of its own.
* *Cross-platform dependencies*. Modern applications often depend on
a combination of system libraries and binaries, language-specific
packages, framework-specific modules, internal components
developed for another project, etc. These dependencies live in
different "worlds" and require different tools - these tools
typically don't work well with each other, requiring awkward
custom integrations.
* Copy-on-write: root filesystems are created using copy-on-write, which makes deployment extremeley fast, memory-cheap and disk-cheap.
* Logging: the standard streams (stdout/stderr/stdin) of each process container is collected and logged for real-time or batch retrieval.
* Change management: changes to a container's filesystem can be committed into a new image and re-used to create more containers. No templating or manual configuration required.
* Interactive shell: docker can allocate a pseudo-tty and attach to the standard input of any container, for example to run a throwaway interactive shell.
* Conflicting dependencies. Different applications may depend on
different versions of the same dependency. Packaging tools handle
these situations with various degrees of ease - but they all
handle them in different and incompatible ways, which again forces
the developer to do extra work.
* Custom dependencies. A developer may need to prepare a custom
version of their application's dependency. Some packaging systems
can handle custom versions of a dependency, others can't - and all
of them handle it differently.
Docker solves dependency hell by giving the developer a simple way to
express *all* their application's dependencies in one place, and
streamline the process of assembling them. If this makes you think of
[XKCD 927](http://xkcd.com/927/), don't worry. Docker doesn't
*replace* your favorite packaging systems. It simply orchestrates
their use in a simple and repeatable way. How does it do that? With
layers.
Docker defines a build as running a sequence of Unix commands, one
after the other, in the same container. Build commands modify the
contents of the container (usually by installing new files on the
filesystem), the next command modifies it some more, etc. Since each
build command inherits the result of the previous commands, the
*order* in which the commands are executed expresses *dependencies*.
Here's a typical Docker build process:
```bash
from ubuntu:12.10
run apt-get update
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y python
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y python-pip
run pip install django
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl
run curl -L https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv
run cd helloflask-master && pip install -r requirements.txt
```
Note that Docker doesn't care *how* dependencies are built - as long
as they can be built by running a Unix command in a container.
Getting started
===============
Docker can be installed on your local machine as well as servers - both bare metal and virtualized.
It is available as a binary on most modern Linux systems, or as a VM on Windows, Mac and other systems.
We also offer an interactive tutorial for quickly learning the basics of using Docker.
For up-to-date install instructions and online tutorials, see the [Getting Started page](http://www.docker.io/gettingstarted/).
Usage examples
==============
Docker can be used to run short-lived commands, long-running daemons (app servers, databases etc.),
interactive shell sessions, etc.
You can find a [list of real-world examples](http://docs.docker.io/en/latest/examples/) in the documentation.
Under the hood
--------------
Under the hood, Docker is built on the following components:
* The [cgroup](http://blog.dotcloud.com/kernel-secrets-from-the-paas-garage-part-24-c) and [namespacing](http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part) capabilities of the Linux kernel;
* [AUFS](http://aufs.sourceforge.net/aufs.html), a powerful union filesystem with copy-on-write capabilities;
* The
[cgroup](http://blog.dotcloud.com/kernel-secrets-from-the-paas-garage-part-24-c)
and
[namespacing](http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part)
capabilities of the Linux kernel;
* [AUFS](http://aufs.sourceforge.net/aufs.html), a powerful union
filesystem with copy-on-write capabilities;
* The [Go](http://golang.org) programming language;
* [lxc](http://lxc.sourceforge.net/), a set of convenience scripts to simplify the creation of linux containers.
* [lxc](http://lxc.sourceforge.net/), a set of convenience scripts to
simplify the creation of Linux containers.
Install instructions
==================
Installing on Ubuntu 12.04 and 12.10
------------------------------------
1. Install dependencies:
```bash
sudo apt-get install lxc wget bsdtar curl
```
2. Install the latest docker binary:
```bash
wget http://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-master.tgz
tar -xf docker-master.tgz
```
3. Run your first container!
```bash
cd docker-master
sudo ./docker run -a -i -t base /bin/bash
```
Consider adding docker to your `PATH` for simplicity.
Installing on other Linux distributions
---------------------------------------
Right now, the officially supported distributions are:
* Ubuntu 12.04 (precise LTS)
* Ubuntu 12.10 (quantal)
Docker probably works on other distributions featuring a recent kernel, the AUFS patch, and up-to-date lxc. However this has not been tested.
Installing with Vagrant
-----------------------
Currently, Docker can be installed with Vagrant both on your localhost
with VirtualBox as well as on Amazon EC2. Vagrant 1.1 is required for
EC2, but deploying is as simple as:
```bash
$ export AWS_ACCESS_KEY_ID=xxx \
AWS_SECRET_ACCESS_KEY=xxx \
AWS_KEYPAIR_NAME=xxx \
AWS_SSH_PRIVKEY=xxx
$ vagrant plugin install vagrant-aws
$ vagrant up --provider=aws
```
The environment variables are:
* `AWS_ACCESS_KEY_ID` - The API key used to make requests to AWS
* `AWS_SECRET_ACCESS_KEY` - The secret key to make AWS API requests
* `AWS_KEYPAIR_NAME` - The name of the keypair used for this EC2 instance
* `AWS_SSH_PRIVKEY` - The path to the private key for the named keypair
For VirtualBox, you can simply ignore setting any of the environment
variables and omit the ``provider`` flag. VirtualBox is still supported with
Vagrant <= 1.1:
```bash
$ vagrant up
```
Usage examples
==============
Running an interactive shell
----------------------------
```bash
# Download a base image
docker import base
# Run an interactive shell in the base image,
# allocate a tty, attach stdin and stdout
docker run -a -i -t base /bin/bash
```
Starting a long-running worker process
--------------------------------------
```bash
# Run docker in daemon mode
(docker -d || echo "Docker daemon already running") &
# Start a very useful long-running process
JOB=$(docker run base /bin/sh -c "while true; do echo Hello world!; sleep 1; done")
# Collect the output of the job so far
docker logs $JOB
# Kill the job
docker kill $JOB
```
Listing all running containers
------------------------------
```bash
docker ps
```
Expose a service on a TCP port
------------------------------
```bash
# Expose port 4444 of this container, and tell netcat to listen on it
JOB=$(docker run -p 4444 base /bin/nc -l -p 4444)
# Which public port is NATed to my container?
PORT=$(docker port $JOB 4444)
# Connect to the public port via the host's public address
echo hello world | nc $(hostname) $PORT
# Verify that the network connection worked
echo "Daemon received: $(docker logs $JOB)"
```
Contributing to Docker
======================
Want to hack on Docker? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete.
Want to hack on Docker? Awesome! There are instructions to get you
started [here](CONTRIBUTING.md).
Contribution guidelines
-----------------------
They are probably not perfect, please let us know if anything feels
wrong or incomplete.
### Pull requests are always welcome
We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it.
### Legal
If your pull request is not accepted on the first try, don't be discouraged! If there's a problen with the implementation, hopefully you received feedback on what to improve.
We're trying very hard to keep Docker lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature.
However there might be a way to implement that feature *on top of* docker.
### Discuss your design on the mailing list
We recommend discussing your plans [on the mailing list](https://groups.google.com/forum/?fromgroups#!forum/docker-club) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point
you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
### Create issues...
Any significant improvement should be documented as a github issue before anybody start working on it.
### ...but check for existing issues first!
Please take a moment to check that an issue doesn't already exist documenting your bug report or improvement proposal.
If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
### Write tests
Golang has a great testing suite built in: use it! Take a look at existing tests for inspiration.
Setting up a dev environment
----------------------------
Coming soon!
What is a Standard Container?
=============================
Docker defines a unit of software delivery called a Standard Container. The goal of a Standard Container is to encapsulate a software component and all its dependencies in
a format that is self-describing and portable, so that any compliant runtime can run it without extra dependency, regardless of the underlying machine and the contents of the container.
The spec for Standard Containers is currently work in progress, but it is very straightforward. It mostly defines 1) an image format, 2) a set of standard operations, and 3) an execution environment.
A great analogy for this is the shipping container. Just like Standard Containers are a fundamental unit of software delivery, shipping containers (http://bricks.argz.com/ins/7823-1/12) are a fundamental unit of physical delivery.
### 1. STANDARD OPERATIONS
Just like shipping containers, Standard Containers define a set of STANDARD OPERATIONS. Shipping containers can be lifted, stacked, locked, loaded, unloaded and labelled. Similarly, standard containers can be started, stopped, copied, snapshotted, downloaded, uploaded and tagged.
### 2. CONTENT-AGNOSTIC
Just like shipping containers, Standard Containers are CONTENT-AGNOSTIC: all standard operations have the same effect regardless of the contents. A shipping container will be stacked in exactly the same way whether it contains Vietnamese powder coffee or spare Maserati parts. Similarly, Standard Containers are started or uploaded in the same way whether they contain a postgres database, a php application with its dependencies and application server, or Java build artifacts.
### 3. INFRASTRUCTURE-AGNOSTIC
Both types of containers are INFRASTRUCTURE-AGNOSTIC: they can be transported to thousands of facilities around the world, and manipulated by a wide variety of equipment. A shipping container can be packed in a factory in Ukraine, transported by truck to the nearest routing center, stacked onto a train, loaded into a German boat by an Australian-built crane, stored in a warehouse at a US facility, etc. Similarly, a standard container can be bundled on my laptop, uploaded to S3, downloaded, run and snapshotted by a build server at Equinix in Virginia, uploaded to 10 staging servers in a home-made Openstack cluster, then sent to 30 production instances across 3 EC2 regions.
### 4. DESIGNED FOR AUTOMATION
Because they offer the same standard operations regardless of content and infrastructure, Standard Containers, just like their physical counterpart, are extremely well-suited for automation. In fact, you could say automation is their secret weapon.
Many things that once required time-consuming and error-prone human effort can now be programmed. Before shipping containers, a bag of powder coffee was hauled, dragged, dropped, rolled and stacked by 10 different people in 10 different locations by the time it reached its destination. 1 out of 50 disappeared. 1 out of 20 was damaged. The process was slow, inefficient and cost a fortune - and was entirely different depending on the facility and the type of goods.
Similarly, before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers. Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken. The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider.
### 5. INDUSTRIAL-GRADE DELIVERY
There are 17 million shipping containers in existence, packed with every physical good imaginable. Every single one of them can be loaded on the same boats, by the same cranes, in the same facilities, and sent anywhere in the World with incredible efficiency. It is embarrassing to think that a 30 ton shipment of coffee can safely travel half-way across the World in *less time* than it takes a software team to deliver its code from one datacenter to another sitting 10 miles away.
With Standard Containers we can put an end to that embarrassment, by making INDUSTRIAL-GRADE DELIVERY of software a reality.
Standard Container Specification
--------------------------------
(TODO)
### Image format
### Standard operations
* Copy
* Run
* Stop
* Wait
* Commit
* Attach standard streams
* List filesystem changes
* ...
### Execution environment
#### Root filesystem
#### Environment variables
#### Process arguments
#### Networking
#### Process namespacing
#### Resource limits
#### Process monitoring
#### Logging
#### Signals
#### Pseudo-terminal allocation
#### Security
*Brought to you courtesy of our legal counsel. For more context,
please see the Notice document.*
Transfers of Docker shall be in accordance with applicable export controls
of any country and all other applicable legal requirements. Without limiting the
foregoing, Docker shall not be distributed or downloaded to any individual or
location if such distribution or download would violate the applicable US
government export regulations.
For more information, please see http://www.bis.doc.gov
+1
View File
@@ -0,0 +1 @@
0.6.5
Vendored
+87 -106
View File
@@ -1,119 +1,100 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("1") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
BOX_NAME = ENV['BOX_NAME'] || "ubuntu"
BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64.box"
VF_BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64_vmware_fusion.box"
AWS_REGION = ENV['AWS_REGION'] || "us-east-1"
AWS_AMI = ENV['AWS_AMI'] || "ami-d0f89fb9"
FORWARD_DOCKER_PORTS = ENV['FORWARD_DOCKER_PORTS']
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "quantal64_3.5.0-25"
Vagrant::Config.run do |config|
# Setup virtual machine box. This VM configuration code is always executed.
config.vm.box = BOX_NAME
config.vm.box_url = BOX_URI
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://get.docker.io/vbox/ubuntu/12.10/quantal64_3.5.0-25.box"
config.ssh.forward_agent = true
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
# Assign this VM to a host-only network IP, allowing you to access it
# via the IP. Host-only networks can talk to the host machine as well as
# any other machines on the same network, but cannot be accessed (through this
# network interface) by any external networks.
# config.vm.network :hostonly, "192.168.33.10"
# Assign this VM to a bridged network, allowing you to connect directly to a
# network using the host's network device. This makes the VM appear as another
# physical device on your network.
# config.vm.network :bridged
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
# config.vm.forward_port 80, 8080
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.share_folder "v-data", "~/docker", "~/docker"
# Enable provisioning with Puppet stand alone. Puppet manifests
# are contained in a directory path relative to this Vagrantfile.
# You will need to create the manifests directory and a manifest in
# the file quantal64.pp in the manifests_path directory.
#
# An example Puppet manifest to provision the message of the day:
#
# # group { "puppet":
# # ensure => "present",
# # }
# #
# # File { owner => 0, group => 0, mode => 0644 }
# #
# # file { '/etc/motd':
# # content => "Welcome to your Vagrant-built virtual machine!
# # Managed by Puppet.\n"
# # }
#
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "quantal64.pp"
puppet.module_path = "puppet/modules"
# Provision docker and new kernel if deployment was not done.
# It is assumed Vagrant can successfully launch the provider instance.
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
# Add lxc-docker package
pkg_cmd = "wget -q -O - https://get.docker.io/gpg | apt-key add -;" \
"echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list;" \
"apt-get update -qq; apt-get install -q -y --force-yes lxc-docker; "
# Add Ubuntu raring backported kernel
pkg_cmd << "apt-get update -qq; apt-get install -q -y linux-image-generic-lts-raring; "
# Add guest additions if local vbox VM. As virtualbox is the default provider,
# it is assumed it won't be explicitly stated.
if ENV["VAGRANT_DEFAULT_PROVIDER"].nil? && ARGV.none? { |arg| arg.downcase.start_with?("--provider") }
pkg_cmd << "apt-get install -q -y linux-headers-generic-lts-raring dkms; " \
"echo 'Downloading VBox Guest Additions...'; " \
"wget -q http://dlc.sun.com.edgesuite.net/virtualbox/4.2.12/VBoxGuestAdditions_4.2.12.iso; "
# Prepare the VM to add guest additions after reboot
pkg_cmd << "echo -e 'mount -o loop,ro /home/vagrant/VBoxGuestAdditions_4.2.12.iso /mnt\n" \
"echo yes | /mnt/VBoxLinuxAdditions.run\numount /mnt\n" \
"rm /root/guest_additions.sh; ' > /root/guest_additions.sh; " \
"chmod 700 /root/guest_additions.sh; " \
"sed -i -E 's#^exit 0#[ -x /root/guest_additions.sh ] \\&\\& /root/guest_additions.sh#' /etc/rc.local; " \
"echo 'Installation of VBox Guest Additions is proceeding in the background.'; " \
"echo '\"vagrant reload\" can be used in about 2 minutes to activate the new guest additions.'; "
end
# Add vagrant user to the docker group
pkg_cmd << "usermod -a -G docker vagrant; "
# Activate new kernel
pkg_cmd << "shutdown -r +1; "
config.vm.provision :shell, :inline => pkg_cmd
end
# Enable provisioning with chef solo, specifying a cookbooks path, roles
# path, and data_bags path (all relative to this Vagrantfile), and adding
# some recipes and/or roles.
#
# config.vm.provision :chef_solo do |chef|
# chef.cookbooks_path = "../my-recipes/cookbooks"
# chef.roles_path = "../my-recipes/roles"
# chef.data_bags_path = "../my-recipes/data_bags"
# chef.add_recipe "mysql"
# chef.add_role "web"
#
# # You may also specify custom JSON attributes:
# chef.json = { :mysql_password => "foo" }
# end
# Enable provisioning with chef server, specifying the chef server URL,
# and the path to the validation key (relative to this Vagrantfile).
#
# The Opscode Platform uses HTTPS. Substitute your organization for
# ORGNAME in the URL and validation key.
#
# If you have your own Chef Server, use the appropriate URL, which may be
# HTTP instead of HTTPS depending on your configuration. Also change the
# validation key to validation.pem.
#
# config.vm.provision :chef_client do |chef|
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
# chef.validation_key_path = "ORGNAME-validator.pem"
# end
#
# If you're using the Opscode platform, your validator client is
# ORGNAME-validator, replacing ORGNAME with your organization name.
#
# IF you have your own Chef Server, the default validation client name is
# chef-validator, unless you changed the configuration.
#
# chef.validation_client_name = "ORGNAME-validator"
end
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws|
config.vm.box = "dummy"
config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
# Providers were added on Vagrant >= 1.1.0
Vagrant::VERSION >= "1.1.0" and Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV["AWS_ACCESS_KEY_ID"]
aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"]
aws.keypair_name = ENV["AWS_KEYPAIR_NAME"]
aws.ssh_private_key_path = ENV["AWS_SSH_PRIVKEY"]
aws.region = "us-east-1"
aws.ami = "ami-1c1e8075"
aws.ssh_username = "vagrant"
aws.instance_type = "t1.micro"
aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"]
aws.keypair_name = ENV["AWS_KEYPAIR_NAME"]
override.ssh.private_key_path = ENV["AWS_SSH_PRIVKEY"]
override.ssh.username = "ubuntu"
aws.region = AWS_REGION
aws.ami = AWS_AMI
aws.instance_type = "t1.micro"
end
config.vm.provider :rackspace do |rs|
config.ssh.private_key_path = ENV["RS_PRIVATE_KEY"]
rs.username = ENV["RS_USERNAME"]
rs.api_key = ENV["RS_API_KEY"]
rs.public_key_path = ENV["RS_PUBLIC_KEY"]
rs.flavor = /512MB/
rs.image = /Ubuntu/
end
config.vm.provider :vmware_fusion do |f, override|
override.vm.box = BOX_NAME
override.vm.box_url = VF_BOX_URI
override.vm.synced_folder ".", "/vagrant", disabled: true
f.vmx["displayName"] = "docker"
end
config.vm.provider :virtualbox do |vb|
config.vm.box = "quantal64_3.5.0-25"
config.vm.box_url = "http://get.docker.io/vbox/ubuntu/12.10/quantal64_3.5.0-25.box"
end
config.vm.box = BOX_NAME
config.vm.box_url = BOX_URI
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
end
if !FORWARD_DOCKER_PORTS.nil?
Vagrant::VERSION < "1.1.0" and Vagrant::Config.run do |config|
(49000..49900).each do |port|
config.vm.forward_port port, port
end
end
Vagrant::VERSION >= "1.1.0" and Vagrant.configure("2") do |config|
(49000..49900).each do |port|
config.vm.network :forwarded_port, :host => port, :guest => port
end
end
end
+1135
View File
File diff suppressed because it is too large Load Diff
+123
View File
@@ -0,0 +1,123 @@
package docker
type APIHistory struct {
ID string `json:"Id"`
Tags []string `json:",omitempty"`
Created int64
CreatedBy string `json:",omitempty"`
}
type APIImages struct {
Repository string `json:",omitempty"`
Tag string `json:",omitempty"`
ID string `json:"Id"`
Created int64
Size int64
VirtualSize int64
}
type APIInfo struct {
Debug bool
Containers int
Images int
NFd int `json:",omitempty"`
NGoroutines int `json:",omitempty"`
MemoryLimit bool `json:",omitempty"`
SwapLimit bool `json:",omitempty"`
IPv4Forwarding bool `json:",omitempty"`
LXCVersion string `json:",omitempty"`
NEventsListener int `json:",omitempty"`
KernelVersion string `json:",omitempty"`
IndexServerAddress string `json:",omitempty"`
}
type APITop struct {
Titles []string
Processes [][]string
}
type APIRmi struct {
Deleted string `json:",omitempty"`
Untagged string `json:",omitempty"`
}
type APIContainers struct {
ID string `json:"Id"`
Image string
Command string
Created int64
Status string
Ports []APIPort
SizeRw int64
SizeRootFs int64
Names []string
}
func (self *APIContainers) ToLegacy() APIContainersOld {
return APIContainersOld{
ID: self.ID,
Image: self.Image,
Command: self.Command,
Created: self.Created,
Status: self.Status,
Ports: displayablePorts(self.Ports),
SizeRw: self.SizeRw,
SizeRootFs: self.SizeRootFs,
}
}
type APIContainersOld struct {
ID string `json:"Id"`
Image string
Command string
Created int64
Status string
Ports string
SizeRw int64
SizeRootFs int64
}
type APISearch struct {
Name string
Description string
}
type APIID struct {
ID string `json:"Id"`
}
type APIRun struct {
ID string `json:"Id"`
Warnings []string `json:",omitempty"`
}
type APIPort struct {
PrivatePort int64
PublicPort int64
Type string
IP string
}
type APIVersion struct {
Version string
GitCommit string `json:",omitempty"`
GoVersion string `json:",omitempty"`
}
type APIWait struct {
StatusCode int
}
type APIAuth struct {
Status string
}
type APIImageConfig struct {
ID string `json:"Id"`
*Config
}
type APICopy struct {
Resource string
HostPath string
}
+1390
View File
File diff suppressed because it is too large Load Diff
+302
View File
@@ -0,0 +1,302 @@
package docker
import (
"archive/tar"
"bytes"
"fmt"
"github.com/dotcloud/docker/utils"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
)
type Archive io.Reader
type Compression uint32
const (
Uncompressed Compression = iota
Bzip2
Gzip
Xz
)
func DetectCompression(source []byte) Compression {
sourceLen := len(source)
for compression, m := range map[Compression][]byte{
Bzip2: {0x42, 0x5A, 0x68},
Gzip: {0x1F, 0x8B, 0x08},
Xz: {0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00},
} {
fail := false
if len(m) > sourceLen {
utils.Debugf("Len too short")
continue
}
i := 0
for _, b := range m {
if b != source[i] {
fail = true
break
}
i++
}
if !fail {
return compression
}
}
return Uncompressed
}
func (compression *Compression) Flag() string {
switch *compression {
case Bzip2:
return "j"
case Gzip:
return "z"
case Xz:
return "J"
}
return ""
}
func (compression *Compression) Extension() string {
switch *compression {
case Uncompressed:
return "tar"
case Bzip2:
return "tar.bz2"
case Gzip:
return "tar.gz"
case Xz:
return "tar.xz"
}
return ""
}
// Tar creates an archive from the directory at `path`, and returns it as a
// stream of bytes.
func Tar(path string, compression Compression) (io.Reader, error) {
return TarFilter(path, compression, nil)
}
// Tar creates an archive from the directory at `path`, only including files whose relative
// paths are included in `filter`. If `filter` is nil, then all files are included.
func TarFilter(path string, compression Compression, filter []string) (io.Reader, error) {
args := []string{"tar", "--numeric-owner", "-f", "-", "-C", path}
if filter == nil {
filter = []string{"."}
}
for _, f := range filter {
args = append(args, "-c"+compression.Flag(), f)
}
return CmdStream(exec.Command(args[0], args[1:]...))
}
// Untar reads a stream of bytes from `archive`, parses it as a tar archive,
// and unpacks it into the directory at `path`.
// The archive may be compressed with one of the following algorithms:
// identity (uncompressed), gzip, bzip2, xz.
// FIXME: specify behavior when target path exists vs. doesn't exist.
func Untar(archive io.Reader, path string) error {
if archive == nil {
return fmt.Errorf("Empty archive")
}
buf := make([]byte, 10)
totalN := 0
for totalN < 10 {
if n, err := archive.Read(buf[totalN:]); err != nil {
if err == io.EOF {
return fmt.Errorf("Tarball too short")
}
return err
} else {
totalN += n
utils.Debugf("[tar autodetect] n: %d", n)
}
}
compression := DetectCompression(buf)
utils.Debugf("Archive compression detected: %s", compression.Extension())
cmd := exec.Command("tar", "--numeric-owner", "-f", "-", "-C", path, "-x"+compression.Flag())
cmd.Stdin = io.MultiReader(bytes.NewReader(buf), archive)
// Hardcode locale environment for predictable outcome regardless of host configuration.
// (see https://github.com/dotcloud/docker/issues/355)
cmd.Env = []string{"LANG=en_US.utf-8", "LC_ALL=en_US.utf-8"}
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("%s: %s", err, output)
}
return nil
}
// TarUntar is a convenience function which calls Tar and Untar, with
// the output of one piped into the other. If either Tar or Untar fails,
// TarUntar aborts and returns the error.
func TarUntar(src string, filter []string, dst string) error {
utils.Debugf("TarUntar(%s %s %s)", src, filter, dst)
archive, err := TarFilter(src, Uncompressed, filter)
if err != nil {
return err
}
return Untar(archive, dst)
}
// UntarPath is a convenience function which looks for an archive
// at filesystem path `src`, and unpacks it at `dst`.
func UntarPath(src, dst string) error {
if archive, err := os.Open(src); err != nil {
return err
} else if err := Untar(archive, dst); err != nil {
return err
}
return nil
}
// CopyWithTar creates a tar archive of filesystem path `src`, and
// unpacks it at filesystem path `dst`.
// The archive is streamed directly with fixed buffering and no
// intermediary disk IO.
//
func CopyWithTar(src, dst string) error {
srcSt, err := os.Stat(src)
if err != nil {
return err
}
if !srcSt.IsDir() {
return CopyFileWithTar(src, dst)
}
// Create dst, copy src's content into it
utils.Debugf("Creating dest directory: %s", dst)
if err := os.MkdirAll(dst, 0755); err != nil && !os.IsExist(err) {
return err
}
utils.Debugf("Calling TarUntar(%s, %s)", src, dst)
return TarUntar(src, nil, dst)
}
// CopyFileWithTar emulates the behavior of the 'cp' command-line
// for a single file. It copies a regular file from path `src` to
// path `dst`, and preserves all its metadata.
//
// If `dst` ends with a trailing slash '/', the final destination path
// will be `dst/base(src)`.
func CopyFileWithTar(src, dst string) error {
utils.Debugf("CopyFileWithTar(%s, %s)", src, dst)
srcSt, err := os.Stat(src)
if err != nil {
return err
}
if srcSt.IsDir() {
return fmt.Errorf("Can't copy a directory")
}
// Clean up the trailing /
if dst[len(dst)-1] == '/' {
dst = path.Join(dst, filepath.Base(src))
}
// Create the holding directory if necessary
if err := os.MkdirAll(filepath.Dir(dst), 0700); err != nil && !os.IsExist(err) {
return err
}
buf := new(bytes.Buffer)
tw := tar.NewWriter(buf)
hdr, err := tar.FileInfoHeader(srcSt, "")
if err != nil {
return err
}
hdr.Name = filepath.Base(dst)
if err := tw.WriteHeader(hdr); err != nil {
return err
}
srcF, err := os.Open(src)
if err != nil {
return err
}
if _, err := io.Copy(tw, srcF); err != nil {
return err
}
tw.Close()
return Untar(buf, filepath.Dir(dst))
}
// CmdStream executes a command, and returns its stdout as a stream.
// If the command fails to run or doesn't complete successfully, an error
// will be returned, including anything written on stderr.
func CmdStream(cmd *exec.Cmd) (io.Reader, error) {
stdout, err := cmd.StdoutPipe()
if err != nil {
return nil, err
}
stderr, err := cmd.StderrPipe()
if err != nil {
return nil, err
}
pipeR, pipeW := io.Pipe()
errChan := make(chan []byte)
// Collect stderr, we will use it in case of an error
go func() {
errText, e := ioutil.ReadAll(stderr)
if e != nil {
errText = []byte("(...couldn't fetch stderr: " + e.Error() + ")")
}
errChan <- errText
}()
// Copy stdout to the returned pipe
go func() {
_, err := io.Copy(pipeW, stdout)
if err != nil {
pipeW.CloseWithError(err)
}
errText := <-errChan
if err := cmd.Wait(); err != nil {
pipeW.CloseWithError(fmt.Errorf("%s: %s", err, errText))
} else {
pipeW.Close()
}
}()
// Run the command and return the pipe
if err := cmd.Start(); err != nil {
return nil, err
}
return pipeR, nil
}
// NewTempArchive reads the content of src into a temporary file, and returns the contents
// of that file as an archive. The archive can only be read once - as soon as reading completes,
// the file will be deleted.
func NewTempArchive(src Archive, dir string) (*TempArchive, error) {
f, err := ioutil.TempFile(dir, "")
if err != nil {
return nil, err
}
if _, err := io.Copy(f, src); err != nil {
return nil, err
}
if _, err := f.Seek(0, 0); err != nil {
return nil, err
}
st, err := f.Stat()
if err != nil {
return nil, err
}
size := st.Size()
return &TempArchive{f, size}, nil
}
type TempArchive struct {
*os.File
Size int64 // Pre-computed from Stat().Size() as a convenience
}
func (archive *TempArchive) Read(data []byte) (int, error) {
n, err := archive.File.Read(data)
if err != nil {
os.Remove(archive.File.Name())
}
return n, err
}
+118
View File
@@ -0,0 +1,118 @@
package docker
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
"testing"
"time"
)
func TestCmdStreamLargeStderr(t *testing.T) {
cmd := exec.Command("/bin/sh", "-c", "dd if=/dev/zero bs=1k count=1000 of=/dev/stderr; echo hello")
out, err := CmdStream(cmd)
if err != nil {
t.Fatalf("Failed to start command: %s", err)
}
errCh := make(chan error)
go func() {
_, err := io.Copy(ioutil.Discard, out)
errCh <- err
}()
select {
case err := <-errCh:
if err != nil {
t.Fatalf("Command should not have failed (err=%.100s...)", err)
}
case <-time.After(5 * time.Second):
t.Fatalf("Command did not complete in 5 seconds; probable deadlock")
}
}
func TestCmdStreamBad(t *testing.T) {
badCmd := exec.Command("/bin/sh", "-c", "echo hello; echo >&2 error couldn\\'t reverse the phase pulser; exit 1")
out, err := CmdStream(badCmd)
if err != nil {
t.Fatalf("Failed to start command: %s", err)
}
if output, err := ioutil.ReadAll(out); err == nil {
t.Fatalf("Command should have failed")
} else if err.Error() != "exit status 1: error couldn't reverse the phase pulser\n" {
t.Fatalf("Wrong error value (%s)", err)
} else if s := string(output); s != "hello\n" {
t.Fatalf("Command output should be '%s', not '%s'", "hello\\n", output)
}
}
func TestCmdStreamGood(t *testing.T) {
cmd := exec.Command("/bin/sh", "-c", "echo hello; exit 0")
out, err := CmdStream(cmd)
if err != nil {
t.Fatal(err)
}
if output, err := ioutil.ReadAll(out); err != nil {
t.Fatalf("Command should not have failed (err=%s)", err)
} else if s := string(output); s != "hello\n" {
t.Fatalf("Command output should be '%s', not '%s'", "hello\\n", output)
}
}
func tarUntar(t *testing.T, origin string, compression Compression) error {
archive, err := Tar(origin, compression)
if err != nil {
t.Fatal(err)
}
buf := make([]byte, 10)
if _, err := archive.Read(buf); err != nil {
return err
}
archive = io.MultiReader(bytes.NewReader(buf), archive)
detectedCompression := DetectCompression(buf)
if detectedCompression.Extension() != compression.Extension() {
return fmt.Errorf("Wrong compression detected. Actual compression: %s, found %s", compression.Extension(), detectedCompression.Extension())
}
tmp, err := ioutil.TempDir("", "docker-test-untar")
if err != nil {
return err
}
defer os.RemoveAll(tmp)
if err := Untar(archive, tmp); err != nil {
return err
}
if _, err := os.Stat(tmp); err != nil {
return err
}
return nil
}
func TestTarUntar(t *testing.T) {
origin, err := ioutil.TempDir("", "docker-test-untar-origin")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(origin)
if err := ioutil.WriteFile(path.Join(origin, "1"), []byte("hello world"), 0700); err != nil {
t.Fatal(err)
}
if err := ioutil.WriteFile(path.Join(origin, "2"), []byte("welcome!"), 0700); err != nil {
t.Fatal(err)
}
for _, c := range []Compression{
Uncompressed,
Gzip,
Bzip2,
Xz,
} {
if err := tarUntar(t, origin, c); err != nil {
t.Fatalf("Error tar/untar for compression %s: %s", c.Extension(), err)
}
}
}
+3
View File
@@ -0,0 +1,3 @@
Sam Alba <sam@dotcloud.com> (@samalba)
Joffrey Fuhrer <joffrey@dotcloud.com> (@shin-)
Ken Cochrane <ken@dotcloud.com> (@kencochrane)
+193 -64
View File
@@ -5,26 +5,45 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/dotcloud/docker/utils"
"io/ioutil"
"net/http"
"os"
"path"
"strings"
)
// Where we store the config file
const CONFIGFILE = "/var/lib/docker/.dockercfg"
const CONFIGFILE = ".dockercfg"
// the registry server we want to login against
const REGISTRY_SERVER = "https://registry.docker.io"
// Only used for user auth + account creation
const INDEXSERVER = "https://index.docker.io/v1/"
//const INDEXSERVER = "https://indexstaging-docker.dotcloud.com/v1/"
var (
ErrConfigFileMissing = errors.New("The Auth config file is missing")
)
type AuthConfig struct {
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Auth string `json:"auth"`
Email string `json:"email"`
ServerAddress string `json:"serveraddress,omitempty"`
}
type ConfigFile struct {
Configs map[string]AuthConfig `json:"configs,omitempty"`
rootPath string
}
func IndexServerAddress() string {
return INDEXSERVER
}
// create a base64 encoded auth string to store in config
func EncodeAuth(authConfig AuthConfig) string {
func encodeAuth(authConfig *AuthConfig) string {
authStr := authConfig.Username + ":" + authConfig.Password
msg := []byte(authStr)
encoded := make([]byte, base64.StdEncoding.EncodedLen(len(msg)))
@@ -33,50 +52,97 @@ func EncodeAuth(authConfig AuthConfig) string {
}
// decode the auth string
func DecodeAuth(authStr string) (AuthConfig, error) {
func decodeAuth(authStr string) (string, string, error) {
decLen := base64.StdEncoding.DecodedLen(len(authStr))
decoded := make([]byte, decLen)
authByte := []byte(authStr)
n, err := base64.StdEncoding.Decode(decoded, authByte)
if err != nil {
return AuthConfig{}, err
return "", "", err
}
if n > decLen {
return AuthConfig{}, errors.New("something went wrong decoding auth config")
return "", "", fmt.Errorf("Something went wrong decoding auth config")
}
arr := strings.Split(string(decoded), ":")
if len(arr) != 2 {
return "", "", fmt.Errorf("Invalid auth configuration file")
}
password := strings.Trim(arr[1], "\x00")
return AuthConfig{Username: arr[0], Password: password}, nil
return arr[0], password, nil
}
// load up the auth config information and return values
func LoadConfig() (AuthConfig, error) {
if _, err := os.Stat(CONFIGFILE); err == nil {
b, err := ioutil.ReadFile(CONFIGFILE)
if err != nil {
return AuthConfig{}, err
}
arr := strings.Split(string(b), "\n")
orig_auth := strings.Split(arr[0], " = ")
orig_email := strings.Split(arr[1], " = ")
authConfig, err := DecodeAuth(orig_auth[1])
if err != nil {
return AuthConfig{}, err
}
authConfig.Email = orig_email[1]
return authConfig, nil
} else {
return AuthConfig{}, nil
// FIXME: use the internal golang config parser
func LoadConfig(rootPath string) (*ConfigFile, error) {
configFile := ConfigFile{Configs: make(map[string]AuthConfig), rootPath: rootPath}
confFile := path.Join(rootPath, CONFIGFILE)
if _, err := os.Stat(confFile); err != nil {
return &configFile, nil //missing file is not an error
}
return AuthConfig{}, nil
b, err := ioutil.ReadFile(confFile)
if err != nil {
return &configFile, err
}
if err := json.Unmarshal(b, &configFile.Configs); err != nil {
arr := strings.Split(string(b), "\n")
if len(arr) < 2 {
return &configFile, fmt.Errorf("The Auth config file is empty")
}
authConfig := AuthConfig{}
origAuth := strings.Split(arr[0], " = ")
if len(origAuth) != 2 {
return &configFile, fmt.Errorf("Invalid Auth config file")
}
authConfig.Username, authConfig.Password, err = decodeAuth(origAuth[1])
if err != nil {
return &configFile, err
}
origEmail := strings.Split(arr[1], " = ")
if len(origEmail) != 2 {
return &configFile, fmt.Errorf("Invalid Auth config file")
}
authConfig.Email = origEmail[1]
authConfig.ServerAddress = IndexServerAddress()
configFile.Configs[IndexServerAddress()] = authConfig
} else {
for k, authConfig := range configFile.Configs {
authConfig.Username, authConfig.Password, err = decodeAuth(authConfig.Auth)
if err != nil {
return &configFile, err
}
authConfig.Auth = ""
configFile.Configs[k] = authConfig
authConfig.ServerAddress = k
}
}
return &configFile, nil
}
// save the auth config
func saveConfig(authStr string, email string) error {
lines := "auth = " + authStr + "\n" + "email = " + email + "\n"
b := []byte(lines)
err := ioutil.WriteFile(CONFIGFILE, b, 0600)
func SaveConfig(configFile *ConfigFile) error {
confFile := path.Join(configFile.rootPath, CONFIGFILE)
if len(configFile.Configs) == 0 {
os.Remove(confFile)
return nil
}
configs := make(map[string]AuthConfig, len(configFile.Configs))
for k, authConfig := range configFile.Configs {
authCopy := authConfig
authCopy.Auth = encodeAuth(&authCopy)
authCopy.Username = ""
authCopy.Password = ""
authCopy.ServerAddress = ""
configs[k] = authCopy
}
b, err := json.Marshal(configs)
if err != nil {
return err
}
err = ioutil.WriteFile(confFile, b, 0600)
if err != nil {
return err
}
@@ -84,40 +150,59 @@ func saveConfig(authStr string, email string) error {
}
// try to register/login to the registry server
func Login(authConfig AuthConfig) (string, error) {
storeConfig := false
func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, error) {
client := &http.Client{}
reqStatusCode := 0
var status string
var errMsg string
var reqBody []byte
jsonBody, err := json.Marshal(authConfig)
if err != nil {
errMsg = fmt.Sprintf("Config Error: %s", err)
return "", errors.New(errMsg)
serverAddress := authConfig.ServerAddress
if serverAddress == "" {
serverAddress = IndexServerAddress()
}
loginAgainstOfficialIndex := serverAddress == IndexServerAddress()
// to avoid sending the server address to the server it should be removed before marshalled
authCopy := *authConfig
authCopy.ServerAddress = ""
jsonBody, err := json.Marshal(authCopy)
if err != nil {
return "", fmt.Errorf("Config Error: %s", err)
}
// using `bytes.NewReader(jsonBody)` here causes the server to respond with a 411 status.
b := strings.NewReader(string(jsonBody))
req1, err := http.Post(REGISTRY_SERVER+"/v1/users", "application/json; charset=utf-8", b)
req1, err := http.Post(serverAddress+"users/", "application/json; charset=utf-8", b)
if err != nil {
errMsg = fmt.Sprintf("Server Error: %s", err)
return "", errors.New(errMsg)
return "", fmt.Errorf("Server Error: %s", err)
}
reqStatusCode = req1.StatusCode
defer req1.Body.Close()
reqBody, err = ioutil.ReadAll(req1.Body)
if err != nil {
errMsg = fmt.Sprintf("Server Error: [%#v] %s", reqStatusCode, err)
return "", errors.New(errMsg)
return "", fmt.Errorf("Server Error: [%#v] %s", reqStatusCode, err)
}
if reqStatusCode == 201 {
status = "Account Created\n"
storeConfig = true
if loginAgainstOfficialIndex {
status = "Account created. Please use the confirmation link we sent" +
" to your e-mail to activate it."
} else {
status = "Account created. Please see the documentation of the registry " + serverAddress + " for instructions how to activate it."
}
} else if reqStatusCode == 403 {
if loginAgainstOfficialIndex {
return "", fmt.Errorf("Login: Your account hasn't been activated. " +
"Please check your e-mail for a confirmation link.")
} else {
return "", fmt.Errorf("Login: Your account hasn't been activated. " +
"Please see the documentation of the registry " + serverAddress + " for instructions how to activate it.")
}
} else if reqStatusCode == 400 {
if string(reqBody) == "Username or email already exist" {
client := &http.Client{}
req, err := http.NewRequest("GET", REGISTRY_SERVER+"/v1/users", nil)
if string(reqBody) == "\"Username or email already exists\"" {
req, err := factory.NewRequest("GET", serverAddress+"users/", nil)
req.SetBasicAuth(authConfig.Username, authConfig.Password)
resp, err := client.Do(req)
if err != nil {
@@ -129,23 +214,67 @@ func Login(authConfig AuthConfig) (string, error) {
return "", err
}
if resp.StatusCode == 200 {
status = "Login Succeeded\n"
storeConfig = true
status = "Login Succeeded"
} else if resp.StatusCode == 401 {
return "", fmt.Errorf("Wrong login/password, please try again")
} else {
status = fmt.Sprintf("Login: %s", body)
return "", errors.New(status)
return "", fmt.Errorf("Login: %s (Code: %d; Headers: %s)", body,
resp.StatusCode, resp.Header)
}
} else {
status = fmt.Sprintf("Registration: %s", string(reqBody))
return "", errors.New(status)
return "", fmt.Errorf("Registration: %s", reqBody)
}
} else {
status = fmt.Sprintf("[%s] : %s", reqStatusCode, string(reqBody))
return "", errors.New(status)
}
if storeConfig {
authStr := EncodeAuth(authConfig)
saveConfig(authStr, authConfig.Email)
return "", fmt.Errorf("Unexpected status code [%d] : %s", reqStatusCode, reqBody)
}
return status, nil
}
// this method matches a auth configuration to a server address or a url
func (config *ConfigFile) ResolveAuthConfig(registry string) AuthConfig {
if registry == IndexServerAddress() || len(registry) == 0 {
// default to the index server
return config.Configs[IndexServerAddress()]
}
// if its not the index server there are three cases:
//
// 1. this is a full config url -> it should be used as is
// 2. it could be a full url, but with the wrong protocol
// 3. it can be the hostname optionally with a port
//
// as there is only one auth entry which is fully qualified we need to start
// parsing and matching
swapProtocol := func(url string) string {
if strings.HasPrefix(url, "http:") {
return strings.Replace(url, "http:", "https:", 1)
}
if strings.HasPrefix(url, "https:") {
return strings.Replace(url, "https:", "http:", 1)
}
return url
}
resolveIgnoringProtocol := func(url string) AuthConfig {
if c, found := config.Configs[url]; found {
return c
}
registrySwappedProtocol := swapProtocol(url)
// now try to match with the different protocol
if c, found := config.Configs[registrySwappedProtocol]; found {
return c
}
return AuthConfig{}
}
// match both protocols as it could also be a server name like httpfoo
if strings.HasPrefix(registry, "http:") || strings.HasPrefix(registry, "https:") {
return resolveIgnoringProtocol(registry)
}
url := "https://" + registry
if !strings.Contains(registry, "/") {
url = url + "/v1/"
}
return resolveIgnoringProtocol(url)
}
+171 -3
View File
@@ -1,13 +1,20 @@
package auth
import (
"crypto/rand"
"encoding/hex"
"io/ioutil"
"os"
"strings"
"testing"
)
func TestEncodeAuth(t *testing.T) {
newAuthConfig := AuthConfig{Username: "ken", Password: "test", Email: "test@example.com"}
authStr := EncodeAuth(newAuthConfig)
decAuthConfig, err := DecodeAuth(authStr)
newAuthConfig := &AuthConfig{Username: "ken", Password: "test", Email: "test@example.com"}
authStr := encodeAuth(newAuthConfig)
decAuthConfig := &AuthConfig{}
var err error
decAuthConfig.Username, decAuthConfig.Password, err = decodeAuth(authStr)
if err != nil {
t.Fatal(err)
}
@@ -21,3 +28,164 @@ func TestEncodeAuth(t *testing.T) {
t.Fatal("AuthString encoding isn't correct.")
}
}
func TestLogin(t *testing.T) {
os.Setenv("DOCKER_INDEX_URL", "https://indexstaging-docker.dotcloud.com")
defer os.Setenv("DOCKER_INDEX_URL", "")
authConfig := &AuthConfig{Username: "unittester", Password: "surlautrerivejetattendrai", Email: "noise+unittester@dotcloud.com"}
status, err := Login(authConfig, nil)
if err != nil {
t.Fatal(err)
}
if status != "Login Succeeded" {
t.Fatalf("Expected status \"Login Succeeded\", found \"%s\" instead", status)
}
}
func TestCreateAccount(t *testing.T) {
os.Setenv("DOCKER_INDEX_URL", "https://indexstaging-docker.dotcloud.com")
defer os.Setenv("DOCKER_INDEX_URL", "")
tokenBuffer := make([]byte, 16)
_, err := rand.Read(tokenBuffer)
if err != nil {
t.Fatal(err)
}
token := hex.EncodeToString(tokenBuffer)[:12]
username := "ut" + token
authConfig := &AuthConfig{Username: username, Password: "test42", Email: "docker-ut+" + token + "@example.com"}
status, err := Login(authConfig, nil)
if err != nil {
t.Fatal(err)
}
expectedStatus := "Account created. Please use the confirmation link we sent" +
" to your e-mail to activate it."
if status != expectedStatus {
t.Fatalf("Expected status: \"%s\", found \"%s\" instead.", expectedStatus, status)
}
status, err = Login(authConfig, nil)
if err == nil {
t.Fatalf("Expected error but found nil instead")
}
expectedError := "Login: Account is not Active"
if !strings.Contains(err.Error(), expectedError) {
t.Fatalf("Expected message \"%s\" but found \"%s\" instead", expectedError, err)
}
}
func setupTempConfigFile() (*ConfigFile, error) {
root, err := ioutil.TempDir("", "docker-test-auth")
if err != nil {
return nil, err
}
configFile := &ConfigFile{
rootPath: root,
Configs: make(map[string]AuthConfig),
}
for _, registry := range []string{"testIndex", IndexServerAddress()} {
configFile.Configs[registry] = AuthConfig{
Username: "docker-user",
Password: "docker-pass",
Email: "docker@docker.io",
}
}
return configFile, nil
}
func TestSameAuthDataPostSave(t *testing.T) {
configFile, err := setupTempConfigFile()
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(configFile.rootPath)
err = SaveConfig(configFile)
if err != nil {
t.Fatal(err)
}
authConfig := configFile.Configs["testIndex"]
if authConfig.Username != "docker-user" {
t.Fail()
}
if authConfig.Password != "docker-pass" {
t.Fail()
}
if authConfig.Email != "docker@docker.io" {
t.Fail()
}
if authConfig.Auth != "" {
t.Fail()
}
}
func TestResolveAuthConfigIndexServer(t *testing.T) {
configFile, err := setupTempConfigFile()
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(configFile.rootPath)
for _, registry := range []string{"", IndexServerAddress()} {
resolved := configFile.ResolveAuthConfig(registry)
if resolved != configFile.Configs[IndexServerAddress()] {
t.Fail()
}
}
}
func TestResolveAuthConfigFullURL(t *testing.T) {
configFile, err := setupTempConfigFile()
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(configFile.rootPath)
registryAuth := AuthConfig{
Username: "foo-user",
Password: "foo-pass",
Email: "foo@example.com",
}
localAuth := AuthConfig{
Username: "bar-user",
Password: "bar-pass",
Email: "bar@example.com",
}
configFile.Configs["https://registry.example.com/v1/"] = registryAuth
configFile.Configs["http://localhost:8000/v1/"] = localAuth
validRegistries := map[string][]string{
"https://registry.example.com/v1/": {
"https://registry.example.com/v1/",
"http://registry.example.com/v1/",
"registry.example.com",
"registry.example.com/v1/",
},
"http://localhost:8000/v1/": {
"https://localhost:8000/v1/",
"http://localhost:8000/v1/",
"localhost:8000",
"localhost:8000/v1/",
},
}
for configKey, registries := range validRegistries {
for _, registry := range registries {
var (
configured AuthConfig
ok bool
)
resolved := configFile.ResolveAuthConfig(registry)
if configured, ok = configFile.Configs[configKey]; !ok {
t.Fail()
}
if resolved.Email != configured.Email {
t.Errorf("%s -> %q != %q\n", registry, resolved.Email, configured.Email)
}
}
}
}
+543
View File
@@ -0,0 +1,543 @@
package docker
import (
"encoding/json"
"fmt"
"github.com/dotcloud/docker/utils"
"io"
"io/ioutil"
"net/url"
"os"
"path"
"reflect"
"regexp"
"strings"
)
type BuildFile interface {
Build(io.Reader) (string, error)
CmdFrom(string) error
CmdRun(string) error
}
type buildFile struct {
runtime *Runtime
srv *Server
image string
maintainer string
config *Config
context string
verbose bool
utilizeCache bool
rm bool
tmpContainers map[string]struct{}
tmpImages map[string]struct{}
out io.Writer
}
func (b *buildFile) clearTmp(containers map[string]struct{}) {
for c := range containers {
tmp := b.runtime.Get(c)
b.runtime.Destroy(tmp)
fmt.Fprintf(b.out, "Removing intermediate container %s\n", utils.TruncateID(c))
}
}
func (b *buildFile) CmdFrom(name string) error {
image, err := b.runtime.repositories.LookupImage(name)
if err != nil {
if b.runtime.graph.IsNotExist(err) {
remote, tag := utils.ParseRepositoryTag(name)
if err := b.srv.ImagePull(remote, tag, b.out, utils.NewStreamFormatter(false), nil, nil, true); err != nil {
return err
}
image, err = b.runtime.repositories.LookupImage(name)
if err != nil {
return err
}
} else {
return err
}
}
b.image = image.ID
b.config = &Config{}
if b.config.Env == nil || len(b.config.Env) == 0 {
b.config.Env = append(b.config.Env, "HOME=/", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
}
return nil
}
func (b *buildFile) CmdMaintainer(name string) error {
b.maintainer = name
return b.commit("", b.config.Cmd, fmt.Sprintf("MAINTAINER %s", name))
}
func (b *buildFile) CmdRun(args string) error {
if b.image == "" {
return fmt.Errorf("Please provide a source image with `from` prior to run")
}
config, _, _, err := ParseRun([]string{b.image, "/bin/sh", "-c", args}, nil)
if err != nil {
return err
}
cmd := b.config.Cmd
b.config.Cmd = nil
MergeConfig(b.config, config)
defer func(cmd []string) { b.config.Cmd = cmd }(cmd)
utils.Debugf("Command to be executed: %v", b.config.Cmd)
if b.utilizeCache {
if cache, err := b.srv.ImageGetCached(b.image, b.config); err != nil {
return err
} else if cache != nil {
fmt.Fprintf(b.out, " ---> Using cache\n")
utils.Debugf("[BUILDER] Use cached version")
b.image = cache.ID
return nil
} else {
utils.Debugf("[BUILDER] Cache miss")
}
}
cid, err := b.run()
if err != nil {
return err
}
if err := b.commit(cid, cmd, "run"); err != nil {
return err
}
return nil
}
func (b *buildFile) FindEnvKey(key string) int {
for k, envVar := range b.config.Env {
envParts := strings.SplitN(envVar, "=", 2)
if key == envParts[0] {
return k
}
}
return -1
}
func (b *buildFile) ReplaceEnvMatches(value string) (string, error) {
exp, err := regexp.Compile("(\\\\\\\\+|[^\\\\]|\\b|\\A)\\$({?)([[:alnum:]_]+)(}?)")
if err != nil {
return value, err
}
matches := exp.FindAllString(value, -1)
for _, match := range matches {
match = match[strings.Index(match, "$"):]
matchKey := strings.Trim(match, "${}")
for _, envVar := range b.config.Env {
envParts := strings.SplitN(envVar, "=", 2)
envKey := envParts[0]
envValue := envParts[1]
if envKey == matchKey {
value = strings.Replace(value, match, envValue, -1)
break
}
}
}
return value, nil
}
func (b *buildFile) CmdEnv(args string) error {
tmp := strings.SplitN(args, " ", 2)
if len(tmp) != 2 {
return fmt.Errorf("Invalid ENV format")
}
key := strings.Trim(tmp[0], " \t")
value := strings.Trim(tmp[1], " \t")
envKey := b.FindEnvKey(key)
replacedValue, err := b.ReplaceEnvMatches(value)
if err != nil {
return err
}
replacedVar := fmt.Sprintf("%s=%s", key, replacedValue)
if envKey >= 0 {
b.config.Env[envKey] = replacedVar
} else {
b.config.Env = append(b.config.Env, replacedVar)
}
return b.commit("", b.config.Cmd, fmt.Sprintf("ENV %s", replacedVar))
}
func (b *buildFile) CmdCmd(args string) error {
var cmd []string
if err := json.Unmarshal([]byte(args), &cmd); err != nil {
utils.Debugf("Error unmarshalling: %s, setting cmd to /bin/sh -c", err)
cmd = []string{"/bin/sh", "-c", args}
}
if err := b.commit("", cmd, fmt.Sprintf("CMD %v", cmd)); err != nil {
return err
}
b.config.Cmd = cmd
return nil
}
func (b *buildFile) CmdExpose(args string) error {
ports := strings.Split(args, " ")
b.config.PortSpecs = append(ports, b.config.PortSpecs...)
return b.commit("", b.config.Cmd, fmt.Sprintf("EXPOSE %v", ports))
}
func (b *buildFile) CmdUser(args string) error {
b.config.User = args
return b.commit("", b.config.Cmd, fmt.Sprintf("USER %v", args))
}
func (b *buildFile) CmdInsert(args string) error {
return fmt.Errorf("INSERT has been deprecated. Please use ADD instead")
}
func (b *buildFile) CmdCopy(args string) error {
return fmt.Errorf("COPY has been deprecated. Please use ADD instead")
}
func (b *buildFile) CmdEntrypoint(args string) error {
if args == "" {
return fmt.Errorf("Entrypoint cannot be empty")
}
var entrypoint []string
if err := json.Unmarshal([]byte(args), &entrypoint); err != nil {
b.config.Entrypoint = []string{"/bin/sh", "-c", args}
} else {
b.config.Entrypoint = entrypoint
}
if err := b.commit("", b.config.Cmd, fmt.Sprintf("ENTRYPOINT %s", args)); err != nil {
return err
}
return nil
}
func (b *buildFile) CmdWorkdir(workdir string) error {
b.config.WorkingDir = workdir
return b.commit("", b.config.Cmd, fmt.Sprintf("WORKDIR %v", workdir))
}
func (b *buildFile) CmdVolume(args string) error {
if args == "" {
return fmt.Errorf("Volume cannot be empty")
}
var volume []string
if err := json.Unmarshal([]byte(args), &volume); err != nil {
volume = []string{args}
}
if b.config.Volumes == nil {
b.config.Volumes = NewPathOpts()
}
for _, v := range volume {
b.config.Volumes[v] = struct{}{}
}
if err := b.commit("", b.config.Cmd, fmt.Sprintf("VOLUME %s", args)); err != nil {
return err
}
return nil
}
func (b *buildFile) addRemote(container *Container, orig, dest string) error {
file, err := utils.Download(orig, ioutil.Discard)
if err != nil {
return err
}
defer file.Body.Close()
// If the destination is a directory, figure out the filename.
if strings.HasSuffix(dest, "/") {
u, err := url.Parse(orig)
if err != nil {
return err
}
path := u.Path
if strings.HasSuffix(path, "/") {
path = path[:len(path)-1]
}
parts := strings.Split(path, "/")
filename := parts[len(parts)-1]
if filename == "" {
return fmt.Errorf("cannot determine filename from url: %s", u)
}
dest = dest + filename
}
return container.Inject(file.Body, dest)
}
func (b *buildFile) addContext(container *Container, orig, dest string) error {
origPath := path.Join(b.context, orig)
destPath := path.Join(container.RootfsPath(), dest)
// Preserve the trailing '/'
if strings.HasSuffix(dest, "/") {
destPath = destPath + "/"
}
if !strings.HasPrefix(origPath, b.context) {
return fmt.Errorf("Forbidden path: %s", origPath)
}
fi, err := os.Stat(origPath)
if err != nil {
return fmt.Errorf("%s: no such file or directory", orig)
}
if fi.IsDir() {
if err := CopyWithTar(origPath, destPath); err != nil {
return err
}
// First try to unpack the source as an archive
} else if err := UntarPath(origPath, destPath); err != nil {
utils.Debugf("Couldn't untar %s to %s: %s", origPath, destPath, err)
// If that fails, just copy it as a regular file
if err := os.MkdirAll(path.Dir(destPath), 0755); err != nil {
return err
}
if err := CopyWithTar(origPath, destPath); err != nil {
return err
}
}
return nil
}
func (b *buildFile) CmdAdd(args string) error {
if b.context == "" {
return fmt.Errorf("No context given. Impossible to use ADD")
}
tmp := strings.SplitN(args, " ", 2)
if len(tmp) != 2 {
return fmt.Errorf("Invalid ADD format")
}
orig, err := b.ReplaceEnvMatches(strings.Trim(tmp[0], " \t"))
if err != nil {
return err
}
dest, err := b.ReplaceEnvMatches(strings.Trim(tmp[1], " \t"))
if err != nil {
return err
}
cmd := b.config.Cmd
b.config.Cmd = []string{"/bin/sh", "-c", fmt.Sprintf("#(nop) ADD %s in %s", orig, dest)}
b.config.Image = b.image
// Create the container and start it
container, _, err := b.runtime.Create(b.config, "")
if err != nil {
return err
}
b.tmpContainers[container.ID] = struct{}{}
if err := container.EnsureMounted(); err != nil {
return err
}
defer container.Unmount()
if utils.IsURL(orig) {
if err := b.addRemote(container, orig, dest); err != nil {
return err
}
} else {
if err := b.addContext(container, orig, dest); err != nil {
return err
}
}
if err := b.commit(container.ID, cmd, fmt.Sprintf("ADD %s in %s", orig, dest)); err != nil {
return err
}
b.config.Cmd = cmd
return nil
}
func (b *buildFile) run() (string, error) {
if b.image == "" {
return "", fmt.Errorf("Please provide a source image with `from` prior to run")
}
b.config.Image = b.image
// Create the container and start it
c, _, err := b.runtime.Create(b.config, "")
if err != nil {
return "", err
}
b.tmpContainers[c.ID] = struct{}{}
fmt.Fprintf(b.out, " ---> Running in %s\n", utils.TruncateID(c.ID))
// override the entry point that may have been picked up from the base image
c.Path = b.config.Cmd[0]
c.Args = b.config.Cmd[1:]
var errCh chan error
if b.verbose {
errCh = utils.Go(func() error {
return <-c.Attach(nil, nil, b.out, b.out)
})
}
//start the container
hostConfig := &HostConfig{}
if err := c.Start(hostConfig); err != nil {
return "", err
}
if errCh != nil {
if err := <-errCh; err != nil {
return "", err
}
}
// Wait for it to finish
if ret := c.Wait(); ret != 0 {
return "", fmt.Errorf("The command %v returned a non-zero code: %d", b.config.Cmd, ret)
}
return c.ID, nil
}
// Commit the container <id> with the autorun command <autoCmd>
func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
if b.image == "" {
return fmt.Errorf("Please provide a source image with `from` prior to commit")
}
b.config.Image = b.image
if id == "" {
cmd := b.config.Cmd
b.config.Cmd = []string{"/bin/sh", "-c", "#(nop) " + comment}
defer func(cmd []string) { b.config.Cmd = cmd }(cmd)
if b.utilizeCache {
if cache, err := b.srv.ImageGetCached(b.image, b.config); err != nil {
return err
} else if cache != nil {
fmt.Fprintf(b.out, " ---> Using cache\n")
utils.Debugf("[BUILDER] Use cached version")
b.image = cache.ID
return nil
} else {
utils.Debugf("[BUILDER] Cache miss")
}
}
container, warnings, err := b.runtime.Create(b.config, "")
if err != nil {
return err
}
for _, warning := range warnings {
fmt.Fprintf(b.out, " ---> [Warning] %s\n", warning)
}
b.tmpContainers[container.ID] = struct{}{}
fmt.Fprintf(b.out, " ---> Running in %s\n", utils.TruncateID(container.ID))
id = container.ID
if err := container.EnsureMounted(); err != nil {
return err
}
defer container.Unmount()
}
container := b.runtime.Get(id)
if container == nil {
return fmt.Errorf("An error occured while creating the container")
}
// Note: Actually copy the struct
autoConfig := *b.config
autoConfig.Cmd = autoCmd
// Commit the container
image, err := b.runtime.Commit(container, "", "", "", b.maintainer, &autoConfig)
if err != nil {
return err
}
b.tmpImages[image.ID] = struct{}{}
b.image = image.ID
return nil
}
// Long lines can be split with a backslash
var lineContinuation = regexp.MustCompile(`\s*\\\s*\n`)
func (b *buildFile) Build(context io.Reader) (string, error) {
// FIXME: @creack "name" is a terrible variable name
name, err := ioutil.TempDir("", "docker-build")
if err != nil {
return "", err
}
if err := Untar(context, name); err != nil {
return "", err
}
defer os.RemoveAll(name)
b.context = name
filename := path.Join(name, "Dockerfile")
if _, err := os.Stat(filename); os.IsNotExist(err) {
return "", fmt.Errorf("Can't build a directory with no Dockerfile")
}
fileBytes, err := ioutil.ReadFile(filename)
if err != nil {
return "", err
}
dockerfile := string(fileBytes)
dockerfile = lineContinuation.ReplaceAllString(dockerfile, "")
stepN := 0
for _, line := range strings.Split(dockerfile, "\n") {
line = strings.Trim(strings.Replace(line, "\t", " ", -1), " \t\r\n")
// Skip comments and empty line
if len(line) == 0 || line[0] == '#' {
continue
}
tmp := strings.SplitN(line, " ", 2)
if len(tmp) != 2 {
return "", fmt.Errorf("Invalid Dockerfile format")
}
instruction := strings.ToLower(strings.Trim(tmp[0], " "))
arguments := strings.Trim(tmp[1], " ")
method, exists := reflect.TypeOf(b).MethodByName("Cmd" + strings.ToUpper(instruction[:1]) + strings.ToLower(instruction[1:]))
if !exists {
fmt.Fprintf(b.out, "# Skipping unknown instruction %s\n", strings.ToUpper(instruction))
continue
}
stepN += 1
fmt.Fprintf(b.out, "Step %d : %s %s\n", stepN, strings.ToUpper(instruction), arguments)
ret := method.Func.Call([]reflect.Value{reflect.ValueOf(b), reflect.ValueOf(arguments)})[0].Interface()
if ret != nil {
return "", ret.(error)
}
fmt.Fprintf(b.out, " ---> %v\n", utils.TruncateID(b.image))
}
if b.image != "" {
fmt.Fprintf(b.out, "Successfully built %s\n", utils.TruncateID(b.image))
if b.rm {
b.clearTmp(b.tmpContainers)
}
return b.image, nil
}
return "", fmt.Errorf("An error occurred during the build\n")
}
func NewBuildFile(srv *Server, out io.Writer, verbose, utilizeCache, rm bool) BuildFile {
return &buildFile{
runtime: srv.runtime,
srv: srv,
config: &Config{},
out: out,
tmpContainers: make(map[string]struct{}),
tmpImages: make(map[string]struct{}),
verbose: verbose,
utilizeCache: utilizeCache,
rm: rm,
}
}
+543
View File
@@ -0,0 +1,543 @@
package docker
import (
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/httptest"
"strings"
"testing"
)
// mkTestContext generates a build context from the contents of the provided dockerfile.
// This context is suitable for use as an argument to BuildFile.Build()
func mkTestContext(dockerfile string, files [][2]string, t *testing.T) Archive {
context, err := mkBuildContext(dockerfile, files)
if err != nil {
t.Fatal(err)
}
return context
}
// A testContextTemplate describes a build context and how to test it
type testContextTemplate struct {
// Contents of the Dockerfile
dockerfile string
// Additional files in the context, eg [][2]string{"./passwd", "gordon"}
files [][2]string
// Additional remote files to host on a local HTTP server.
remoteFiles [][2]string
}
// A table of all the contexts to build and test.
// A new docker runtime will be created and torn down for each context.
var testContexts = []testContextTemplate{
{
`
from {IMAGE}
run sh -c 'echo root:testpass > /tmp/passwd'
run mkdir -p /var/run/sshd
run [ "$(cat /tmp/passwd)" = "root:testpass" ]
run [ "$(ls -d /var/run/sshd)" = "/var/run/sshd" ]
`,
nil,
nil,
},
// Exactly the same as above, except uses a line split with a \ to test
// multiline support.
{
`
from {IMAGE}
run sh -c 'echo root:testpass \
> /tmp/passwd'
run mkdir -p /var/run/sshd
run [ "$(cat /tmp/passwd)" = "root:testpass" ]
run [ "$(ls -d /var/run/sshd)" = "/var/run/sshd" ]
`,
nil,
nil,
},
// Line containing literal "\n"
{
`
from {IMAGE}
run sh -c 'echo root:testpass > /tmp/passwd'
run echo "foo \n bar"; echo "baz"
run mkdir -p /var/run/sshd
run [ "$(cat /tmp/passwd)" = "root:testpass" ]
run [ "$(ls -d /var/run/sshd)" = "/var/run/sshd" ]
`,
nil,
nil,
},
{
`
from {IMAGE}
add foo /usr/lib/bla/bar
run [ "$(cat /usr/lib/bla/bar)" = 'hello' ]
add http://{SERVERADDR}/baz /usr/lib/baz/quux
run [ "$(cat /usr/lib/baz/quux)" = 'world!' ]
`,
[][2]string{{"foo", "hello"}},
[][2]string{{"/baz", "world!"}},
},
{
`
from {IMAGE}
add f /
run [ "$(cat /f)" = "hello" ]
add f /abc
run [ "$(cat /abc)" = "hello" ]
add f /x/y/z
run [ "$(cat /x/y/z)" = "hello" ]
add f /x/y/d/
run [ "$(cat /x/y/d/f)" = "hello" ]
add d /
run [ "$(cat /ga)" = "bu" ]
add d /somewhere
run [ "$(cat /somewhere/ga)" = "bu" ]
add d /anotherplace/
run [ "$(cat /anotherplace/ga)" = "bu" ]
add d /somewheeeere/over/the/rainbooow
run [ "$(cat /somewheeeere/over/the/rainbooow/ga)" = "bu" ]
`,
[][2]string{
{"f", "hello"},
{"d/ga", "bu"},
},
nil,
},
{
`
from {IMAGE}
add http://{SERVERADDR}/x /a/b/c
run [ "$(cat /a/b/c)" = "hello" ]
add http://{SERVERADDR}/x?foo=bar /
run [ "$(cat /x)" = "hello" ]
add http://{SERVERADDR}/x /d/
run [ "$(cat /d/x)" = "hello" ]
add http://{SERVERADDR} /e
run [ "$(cat /e)" = "blah" ]
`,
nil,
[][2]string{{"/x", "hello"}, {"/", "blah"}},
},
{
`
from {IMAGE}
env FOO BAR
run [ "$FOO" = "BAR" ]
`,
nil,
nil,
},
{
`
from {IMAGE}
ENTRYPOINT /bin/echo
CMD Hello world
`,
nil,
nil,
},
{
`
from {IMAGE}
VOLUME /test
CMD Hello world
`,
nil,
nil,
},
{
`
from {IMAGE}
env FOO /foo/baz
env BAR /bar
env BAZ $BAR
env FOOPATH $PATH:$FOO
run [ "$BAR" = "$BAZ" ]
run [ "$FOOPATH" = "$PATH:/foo/baz" ]
`,
nil,
nil,
},
{
`
from {IMAGE}
env FOO /bar
env TEST testdir
env BAZ /foobar
add testfile $BAZ/
add $TEST $FOO
run [ "$(cat /foobar/testfile)" = "test1" ]
run [ "$(cat /bar/withfile)" = "test2" ]
`,
[][2]string{
{"testfile", "test1"},
{"testdir/withfile", "test2"},
},
nil,
},
}
// FIXME: test building with 2 successive overlapping ADD commands
func constructDockerfile(template string, ip net.IP, port string) string {
serverAddr := fmt.Sprintf("%s:%s", ip, port)
replacer := strings.NewReplacer("{IMAGE}", unitTestImageID, "{SERVERADDR}", serverAddr)
return replacer.Replace(template)
}
func mkTestingFileServer(files [][2]string) (*httptest.Server, error) {
mux := http.NewServeMux()
for _, file := range files {
name, contents := file[0], file[1]
mux.HandleFunc(name, func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(contents))
})
}
// This is how httptest.NewServer sets up a net.Listener, except that our listener must accept remote
// connections (from the container).
listener, err := net.Listen("tcp", ":0")
if err != nil {
return nil, err
}
s := httptest.NewUnstartedServer(mux)
s.Listener = listener
s.Start()
return s, nil
}
func TestBuild(t *testing.T) {
for _, ctx := range testContexts {
buildImage(ctx, t, nil, true)
}
}
func buildImage(context testContextTemplate, t *testing.T, srv *Server, useCache bool) *Image {
if srv == nil {
runtime := mkRuntime(t)
defer nuke(runtime)
srv = &Server{
runtime: runtime,
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
}
httpServer, err := mkTestingFileServer(context.remoteFiles)
if err != nil {
t.Fatal(err)
}
defer httpServer.Close()
idx := strings.LastIndex(httpServer.URL, ":")
if idx < 0 {
t.Fatalf("could not get port from test http server address %s", httpServer.URL)
}
port := httpServer.URL[idx+1:]
ip := srv.runtime.networkManager.bridgeNetwork.IP
dockerfile := constructDockerfile(context.dockerfile, ip, port)
buildfile := NewBuildFile(srv, ioutil.Discard, false, useCache, false)
id, err := buildfile.Build(mkTestContext(dockerfile, context.files, t))
if err != nil {
t.Fatal(err)
}
img, err := srv.ImageInspect(id)
if err != nil {
t.Fatal(err)
}
return img
}
func TestVolume(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
volume /test
cmd Hello world
`, nil, nil}, t, nil, true)
if len(img.Config.Volumes) == 0 {
t.Fail()
}
for key := range img.Config.Volumes {
if key != "/test" {
t.Fail()
}
}
}
func TestBuildMaintainer(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
maintainer dockerio
`, nil, nil}, t, nil, true)
if img.Author != "dockerio" {
t.Fail()
}
}
func TestBuildUser(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
user dockerio
`, nil, nil}, t, nil, true)
if img.Config.User != "dockerio" {
t.Fail()
}
}
func TestBuildEnv(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
env port 4243
`,
nil, nil}, t, nil, true)
hasEnv := false
for _, envVar := range img.Config.Env {
if envVar == "port=4243" {
hasEnv = true
break
}
}
if !hasEnv {
t.Fail()
}
}
func TestBuildCmd(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
cmd ["/bin/echo", "Hello World"]
`,
nil, nil}, t, nil, true)
if img.Config.Cmd[0] != "/bin/echo" {
t.Log(img.Config.Cmd[0])
t.Fail()
}
if img.Config.Cmd[1] != "Hello World" {
t.Log(img.Config.Cmd[1])
t.Fail()
}
}
func TestBuildExpose(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
expose 4243
`,
nil, nil}, t, nil, true)
if img.Config.PortSpecs[0] != "4243" {
t.Fail()
}
}
func TestBuildEntrypoint(t *testing.T) {
img := buildImage(testContextTemplate{`
from {IMAGE}
entrypoint ["/bin/echo"]
`,
nil, nil}, t, nil, true)
if img.Config.Entrypoint[0] != "/bin/echo" {
}
}
// testing #1405 - config.Cmd does not get cleaned up if
// utilizing cache
func TestBuildEntrypointRunCleanup(t *testing.T) {
runtime := mkRuntime(t)
defer nuke(runtime)
srv := &Server{
runtime: runtime,
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
img := buildImage(testContextTemplate{`
from {IMAGE}
run echo "hello"
`,
nil, nil}, t, srv, true)
img = buildImage(testContextTemplate{`
from {IMAGE}
run echo "hello"
add foo /foo
entrypoint ["/bin/echo"]
`,
[][2]string{{"foo", "HEYO"}}, nil}, t, srv, true)
if len(img.Config.Cmd) != 0 {
t.Fail()
}
}
func TestBuildImageWithCache(t *testing.T) {
runtime := mkRuntime(t)
defer nuke(runtime)
srv := &Server{
runtime: runtime,
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
template := testContextTemplate{`
from {IMAGE}
maintainer dockerio
`,
nil, nil}
img := buildImage(template, t, srv, true)
imageId := img.ID
img = nil
img = buildImage(template, t, srv, true)
if imageId != img.ID {
t.Logf("Image ids should match: %s != %s", imageId, img.ID)
t.Fail()
}
}
func TestBuildImageWithoutCache(t *testing.T) {
runtime := mkRuntime(t)
defer nuke(runtime)
srv := &Server{
runtime: runtime,
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
template := testContextTemplate{`
from {IMAGE}
maintainer dockerio
`,
nil, nil}
img := buildImage(template, t, srv, true)
imageId := img.ID
img = nil
img = buildImage(template, t, srv, false)
if imageId == img.ID {
t.Logf("Image ids should not match: %s == %s", imageId, img.ID)
t.Fail()
}
}
func TestForbiddenContextPath(t *testing.T) {
runtime := mkRuntime(t)
defer nuke(runtime)
srv := &Server{
runtime: runtime,
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
context := testContextTemplate{`
from {IMAGE}
maintainer dockerio
add ../../ test/
`,
[][2]string{{"test.txt", "test1"}, {"other.txt", "other"}}, nil}
httpServer, err := mkTestingFileServer(context.remoteFiles)
if err != nil {
t.Fatal(err)
}
defer httpServer.Close()
idx := strings.LastIndex(httpServer.URL, ":")
if idx < 0 {
t.Fatalf("could not get port from test http server address %s", httpServer.URL)
}
port := httpServer.URL[idx+1:]
ip := srv.runtime.networkManager.bridgeNetwork.IP
dockerfile := constructDockerfile(context.dockerfile, ip, port)
buildfile := NewBuildFile(srv, ioutil.Discard, false, true, false)
_, err = buildfile.Build(mkTestContext(dockerfile, context.files, t))
if err == nil {
t.Log("Error should not be nil")
t.Fail()
}
if err.Error() != "Forbidden path: /" {
t.Logf("Error message is not expected: %s", err.Error())
t.Fail()
}
}
func TestBuildADDFileNotFound(t *testing.T) {
runtime := mkRuntime(t)
defer nuke(runtime)
srv := &Server{
runtime: runtime,
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
context := testContextTemplate{`
from {IMAGE}
add foo /usr/local/bar
`,
nil, nil}
httpServer, err := mkTestingFileServer(context.remoteFiles)
if err != nil {
t.Fatal(err)
}
defer httpServer.Close()
idx := strings.LastIndex(httpServer.URL, ":")
if idx < 0 {
t.Fatalf("could not get port from test http server address %s", httpServer.URL)
}
port := httpServer.URL[idx+1:]
ip := srv.runtime.networkManager.bridgeNetwork.IP
dockerfile := constructDockerfile(context.dockerfile, ip, port)
buildfile := NewBuildFile(srv, ioutil.Discard, false, true, false)
_, err = buildfile.Build(mkTestContext(dockerfile, context.files, t))
if err == nil {
t.Log("Error should not be nil")
t.Fail()
}
if err.Error() != "foo: no such file or directory" {
t.Logf("Error message is not expected: %s", err.Error())
t.Fail()
}
}
+6 -27
View File
@@ -1,4 +1,4 @@
package fs
package docker
import (
"fmt"
@@ -33,24 +33,15 @@ func (change *Change) String() string {
return fmt.Sprintf("%s %s", kind, change.Path)
}
func (store *Store) Changes(mp *Mountpoint) ([]Change, error) {
func Changes(layers []string, rw string) ([]Change, error) {
var changes []Change
image, err := store.Get(mp.Image)
if err != nil {
return nil, err
}
layers, err := image.layers()
if err != nil {
return nil, err
}
err = filepath.Walk(mp.Rw, func(path string, f os.FileInfo, err error) error {
err := filepath.Walk(rw, func(path string, f os.FileInfo, err error) error {
if err != nil {
return err
}
// Rebase path
path, err = filepath.Rel(mp.Rw, path)
path, err = filepath.Rel(rw, path)
if err != nil {
return err
}
@@ -74,7 +65,7 @@ func (store *Store) Changes(mp *Mountpoint) ([]Change, error) {
file := filepath.Base(path)
// If there is a whiteout, then the file was removed
if strings.HasPrefix(file, ".wh.") {
originalFile := strings.TrimLeft(file, ".wh.")
originalFile := file[len(".wh."):]
change.Path = filepath.Join(filepath.Dir(path), originalFile)
change.Kind = ChangeDelete
} else {
@@ -108,20 +99,8 @@ func (store *Store) Changes(mp *Mountpoint) ([]Change, error) {
changes = append(changes, change)
return nil
})
if err != nil {
if err != nil && !os.IsNotExist(err) {
return nil, err
}
return changes, nil
}
// Reset removes all changes to the filesystem, reverting it to its initial state.
func (mp *Mountpoint) Reset() error {
if err := os.RemoveAll(mp.Rw); err != nil {
return err
}
// We removed the RW directory itself along with its content: let's re-create an empty one.
if err := mp.createFolders(); err != nil {
return err
}
return nil
}
+1853 -806
View File
File diff suppressed because it is too large Load Diff
+647
View File
@@ -0,0 +1,647 @@
package docker
import (
"bufio"
"fmt"
"github.com/dotcloud/docker/utils"
"io"
"io/ioutil"
"strings"
"testing"
"time"
)
func closeWrap(args ...io.Closer) error {
e := false
ret := fmt.Errorf("Error closing elements")
for _, c := range args {
if err := c.Close(); err != nil {
e = true
ret = fmt.Errorf("%s\n%s", ret, err)
}
}
if e {
return ret
}
return nil
}
func setTimeout(t *testing.T, msg string, d time.Duration, f func()) {
c := make(chan bool)
// Make sure we are not too long
go func() {
time.Sleep(d)
c <- true
}()
go func() {
f()
c <- false
}()
if <-c && msg != "" {
t.Fatal(msg)
}
}
func assertPipe(input, output string, r io.Reader, w io.Writer, count int) error {
for i := 0; i < count; i++ {
if _, err := w.Write([]byte(input)); err != nil {
return err
}
o, err := bufio.NewReader(r).ReadString('\n')
if err != nil {
return err
}
if strings.Trim(o, " \r\n") != output {
return fmt.Errorf("Unexpected output. Expected [%s], received [%s]", output, o)
}
}
return nil
}
// TestRunHostname checks that 'docker run -h' correctly sets a custom hostname
func TestRunHostname(t *testing.T) {
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c := make(chan struct{})
go func() {
defer close(c)
if err := cli.CmdRun("-h", "foobar", unitTestImageID, "hostname"); err != nil {
t.Fatal(err)
}
}()
setTimeout(t, "Reading command output time out", 2*time.Second, func() {
cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
if err != nil {
t.Fatal(err)
}
if cmdOutput != "foobar\n" {
t.Fatalf("'hostname' should display '%s', not '%s'", "foobar\n", cmdOutput)
}
})
container := globalRuntime.List()[0]
setTimeout(t, "CmdRun timed out", 10*time.Second, func() {
<-c
go func() {
cli.CmdWait(container.ID)
}()
if _, err := bufio.NewReader(stdout).ReadString('\n'); err != nil {
t.Fatal(err)
}
})
// Cleanup pipes
if err := closeWrap(stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
}
// TestRunWorkdir checks that 'docker run -w' correctly sets a custom working directory
func TestRunWorkdir(t *testing.T) {
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c := make(chan struct{})
go func() {
defer close(c)
if err := cli.CmdRun("-w", "/foo/bar", unitTestImageID, "pwd"); err != nil {
t.Fatal(err)
}
}()
setTimeout(t, "Reading command output time out", 2*time.Second, func() {
cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
if err != nil {
t.Fatal(err)
}
if cmdOutput != "/foo/bar\n" {
t.Fatalf("'pwd' should display '%s', not '%s'", "/foo/bar\n", cmdOutput)
}
})
container := globalRuntime.List()[0]
setTimeout(t, "CmdRun timed out", 10*time.Second, func() {
<-c
go func() {
cli.CmdWait(container.ID)
}()
if _, err := bufio.NewReader(stdout).ReadString('\n'); err != nil {
t.Fatal(err)
}
})
// Cleanup pipes
if err := closeWrap(stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
}
// TestRunWorkdirExists checks that 'docker run -w' correctly sets a custom working directory, even if it exists
func TestRunWorkdirExists(t *testing.T) {
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c := make(chan struct{})
go func() {
defer close(c)
if err := cli.CmdRun("-w", "/proc", unitTestImageID, "pwd"); err != nil {
t.Fatal(err)
}
}()
setTimeout(t, "Reading command output time out", 2*time.Second, func() {
cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
if err != nil {
t.Fatal(err)
}
if cmdOutput != "/proc\n" {
t.Fatalf("'pwd' should display '%s', not '%s'", "/proc\n", cmdOutput)
}
})
container := globalRuntime.List()[0]
setTimeout(t, "CmdRun timed out", 5*time.Second, func() {
<-c
go func() {
cli.CmdWait(container.ID)
}()
if _, err := bufio.NewReader(stdout).ReadString('\n'); err != nil {
t.Fatal(err)
}
})
// Cleanup pipes
if err := closeWrap(stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
}
func TestRunExit(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c1 := make(chan struct{})
go func() {
cli.CmdRun("-i", unitTestImageID, "/bin/cat")
close(c1)
}()
setTimeout(t, "Read/Write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
t.Fatal(err)
}
})
container := globalRuntime.List()[0]
// Closing /bin/cat stdin, expect it to exit
if err := stdin.Close(); err != nil {
t.Fatal(err)
}
// as the process exited, CmdRun must finish and unblock. Wait for it
setTimeout(t, "Waiting for CmdRun timed out", 10*time.Second, func() {
<-c1
go func() {
cli.CmdWait(container.ID)
}()
if _, err := bufio.NewReader(stdout).ReadString('\n'); err != nil {
t.Fatal(err)
}
})
// Make sure that the client has been disconnected
setTimeout(t, "The client should have been disconnected once the remote process exited.", 2*time.Second, func() {
// Expecting pipe i/o error, just check that read does not block
stdin.Read([]byte{})
})
// Cleanup pipes
if err := closeWrap(stdin, stdinPipe, stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
}
// Expected behaviour: the process dies when the client disconnects
func TestRunDisconnect(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c1 := make(chan struct{})
go func() {
// We're simulating a disconnect so the return value doesn't matter. What matters is the
// fact that CmdRun returns.
cli.CmdRun("-i", unitTestImageID, "/bin/cat")
close(c1)
}()
setTimeout(t, "Read/Write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
t.Fatal(err)
}
})
// Close pipes (simulate disconnect)
if err := closeWrap(stdin, stdinPipe, stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
// as the pipes are close, we expect the process to die,
// therefore CmdRun to unblock. Wait for CmdRun
setTimeout(t, "Waiting for CmdRun timed out", 2*time.Second, func() {
<-c1
})
// Client disconnect after run -i should cause stdin to be closed, which should
// cause /bin/cat to exit.
setTimeout(t, "Waiting for /bin/cat to exit timed out", 2*time.Second, func() {
container := globalRuntime.List()[0]
container.Wait()
if container.State.Running {
t.Fatalf("/bin/cat is still running after closing stdin")
}
})
}
// Expected behaviour: the process dies when the client disconnects
func TestRunDisconnectTty(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c1 := make(chan struct{})
go func() {
// We're simulating a disconnect so the return value doesn't matter. What matters is the
// fact that CmdRun returns.
if err := cli.CmdRun("-i", "-t", unitTestImageID, "/bin/cat"); err != nil {
utils.Debugf("Error CmdRun: %s", err)
}
close(c1)
}()
setTimeout(t, "Waiting for the container to be started timed out", 10*time.Second, func() {
for {
// Client disconnect after run -i should keep stdin out in TTY mode
l := globalRuntime.List()
if len(l) == 1 && l[0].State.Running {
break
}
time.Sleep(10 * time.Millisecond)
}
})
// Client disconnect after run -i should keep stdin out in TTY mode
container := globalRuntime.List()[0]
setTimeout(t, "Read/Write assertion timed out", 2000*time.Second, func() {
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
t.Fatal(err)
}
})
// Close pipes (simulate disconnect)
if err := closeWrap(stdin, stdinPipe, stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
// In tty mode, we expect the process to stay alive even after client's stdin closes.
// Do not wait for run to finish
// Give some time to monitor to do his thing
container.WaitTimeout(500 * time.Millisecond)
if !container.State.Running {
t.Fatalf("/bin/cat should still be running after closing stdin (tty mode)")
}
}
// TestAttachStdin checks attaching to stdin without stdout and stderr.
// 'docker run -i -a stdin' should sends the client's stdin to the command,
// then detach from it and print the container id.
func TestRunAttachStdin(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
ch := make(chan struct{})
go func() {
defer close(ch)
cli.CmdRun("-i", "-a", "stdin", unitTestImageID, "sh", "-c", "echo hello && cat && sleep 5")
}()
// Send input to the command, close stdin
setTimeout(t, "Write timed out", 10*time.Second, func() {
if _, err := stdinPipe.Write([]byte("hi there\n")); err != nil {
t.Fatal(err)
}
if err := stdinPipe.Close(); err != nil {
t.Fatal(err)
}
})
container := globalRuntime.List()[0]
// Check output
setTimeout(t, "Reading command output time out", 10*time.Second, func() {
cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
if err != nil {
t.Fatal(err)
}
if cmdOutput != container.ShortID()+"\n" {
t.Fatalf("Wrong output: should be '%s', not '%s'\n", container.ShortID()+"\n", cmdOutput)
}
})
// wait for CmdRun to return
setTimeout(t, "Waiting for CmdRun timed out", 5*time.Second, func() {
<-ch
})
setTimeout(t, "Waiting for command to exit timed out", 10*time.Second, func() {
container.Wait()
})
// Check logs
if cmdLogs, err := container.ReadLog("json"); err != nil {
t.Fatal(err)
} else {
if output, err := ioutil.ReadAll(cmdLogs); err != nil {
t.Fatal(err)
} else {
expectedLogs := []string{"{\"log\":\"hello\\n\",\"stream\":\"stdout\"", "{\"log\":\"hi there\\n\",\"stream\":\"stdout\""}
for _, expectedLog := range expectedLogs {
if !strings.Contains(string(output), expectedLog) {
t.Fatalf("Unexpected logs: should contains '%s', it is not '%s'\n", expectedLog, output)
}
}
}
}
}
// TestRunDetach checks attaching and detaching with the escape sequence.
func TestRunDetach(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
ch := make(chan struct{})
go func() {
defer close(ch)
cli.CmdRun("-i", "-t", unitTestImageID, "cat")
}()
setTimeout(t, "First read/write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
t.Fatal(err)
}
})
container := globalRuntime.List()[0]
setTimeout(t, "Escape sequence timeout", 5*time.Second, func() {
stdinPipe.Write([]byte{16, 17})
if err := stdinPipe.Close(); err != nil {
t.Fatal(err)
}
})
closeWrap(stdin, stdinPipe, stdout, stdoutPipe)
// wait for CmdRun to return
setTimeout(t, "Waiting for CmdRun timed out", 15*time.Second, func() {
<-ch
})
time.Sleep(500 * time.Millisecond)
if !container.State.Running {
t.Fatal("The detached container should be still running")
}
setTimeout(t, "Waiting for container to die timed out", 20*time.Second, func() {
container.Kill()
})
}
// TestAttachDetach checks that attach in tty mode can be detached
func TestAttachDetach(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
ch := make(chan struct{})
go func() {
defer close(ch)
if err := cli.CmdRun("-i", "-t", "-d", unitTestImageID, "cat"); err != nil {
t.Fatal(err)
}
}()
var container *Container
setTimeout(t, "Reading container's id timed out", 10*time.Second, func() {
buf := make([]byte, 1024)
n, err := stdout.Read(buf)
if err != nil {
t.Fatal(err)
}
container = globalRuntime.List()[0]
if strings.Trim(string(buf[:n]), " \r\n") != container.ShortID() {
t.Fatalf("Wrong ID received. Expect %s, received %s", container.ShortID(), buf[:n])
}
})
setTimeout(t, "Starting container timed out", 10*time.Second, func() {
<-ch
})
stdin, stdinPipe = io.Pipe()
stdout, stdoutPipe = io.Pipe()
cli = NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
ch = make(chan struct{})
go func() {
defer close(ch)
if err := cli.CmdAttach(container.ShortID()); err != nil {
if err != io.ErrClosedPipe {
t.Fatal(err)
}
}
}()
setTimeout(t, "First read/write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
if err != io.ErrClosedPipe {
t.Fatal(err)
}
}
})
setTimeout(t, "Escape sequence timeout", 5*time.Second, func() {
stdinPipe.Write([]byte{16, 17})
if err := stdinPipe.Close(); err != nil {
t.Fatal(err)
}
})
closeWrap(stdin, stdinPipe, stdout, stdoutPipe)
// wait for CmdRun to return
setTimeout(t, "Waiting for CmdAttach timed out", 15*time.Second, func() {
<-ch
})
time.Sleep(500 * time.Millisecond)
if !container.State.Running {
t.Fatal("The detached container should be still running")
}
setTimeout(t, "Waiting for container to die timedout", 5*time.Second, func() {
container.Kill()
})
}
// Expected behaviour, the process stays alive when the client disconnects
func TestAttachDisconnect(t *testing.T) {
stdin, stdinPipe := io.Pipe()
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
go func() {
// Start a process in daemon mode
if err := cli.CmdRun("-d", "-i", unitTestImageID, "/bin/cat"); err != nil {
utils.Debugf("Error CmdRun: %s", err)
}
}()
setTimeout(t, "Waiting for CmdRun timed out", 10*time.Second, func() {
if _, err := bufio.NewReader(stdout).ReadString('\n'); err != nil {
t.Fatal(err)
}
})
setTimeout(t, "Waiting for the container to be started timed out", 10*time.Second, func() {
for {
l := globalRuntime.List()
if len(l) == 1 && l[0].State.Running {
break
}
time.Sleep(10 * time.Millisecond)
}
})
container := globalRuntime.List()[0]
// Attach to it
c1 := make(chan struct{})
go func() {
// We're simulating a disconnect so the return value doesn't matter. What matters is the
// fact that CmdAttach returns.
cli.CmdAttach(container.ID)
close(c1)
}()
setTimeout(t, "First read/write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
t.Fatal(err)
}
})
// Close pipes (client disconnects)
if err := closeWrap(stdin, stdinPipe, stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
// Wait for attach to finish, the client disconnected, therefore, Attach finished his job
setTimeout(t, "Waiting for CmdAttach timed out", 2*time.Second, func() {
<-c1
})
// We closed stdin, expect /bin/cat to still be running
// Wait a little bit to make sure container.monitor() did his thing
err := container.WaitTimeout(500 * time.Millisecond)
if err == nil || !container.State.Running {
t.Fatalf("/bin/cat is not running after closing stdin")
}
// Try to avoid the timeout in destroy. Best effort, don't check error
cStdin, _ := container.StdinPipe()
cStdin.Close()
container.Wait()
}
// Expected behaviour: container gets deleted automatically after exit
func TestRunAutoRemove(t *testing.T) {
t.Skip("Fixme. Skipping test for now, race condition")
stdout, stdoutPipe := io.Pipe()
cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
defer cleanup(globalRuntime)
c := make(chan struct{})
go func() {
defer close(c)
if err := cli.CmdRun("-rm", unitTestImageID, "hostname"); err != nil {
t.Fatal(err)
}
}()
var temporaryContainerID string
setTimeout(t, "Reading command output time out", 2*time.Second, func() {
cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
if err != nil {
t.Fatal(err)
}
temporaryContainerID = cmdOutput
if err := closeWrap(stdout, stdoutPipe); err != nil {
t.Fatal(err)
}
})
setTimeout(t, "CmdRun timed out", 10*time.Second, func() {
<-c
})
time.Sleep(500 * time.Millisecond)
if len(globalRuntime.List()) > 0 {
t.Fatalf("failed to remove container automatically: container %s still exists", temporaryContainerID)
}
}
+18
View File
@@ -0,0 +1,18 @@
package docker
import (
"net"
)
type DaemonConfig struct {
Pidfile string
GraphPath string
ProtoAddresses []string
AutoRestart bool
EnableCors bool
Dns []string
EnableIptables bool
BridgeIface string
DefaultIp net.IP
InterContainerCommunication bool
}
+1242 -295
View File
File diff suppressed because it is too large Load Diff
+1214 -319
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,23 @@
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Dockerfile
scopeName: source.dockerfile
uuid: a39d8795-59d2-49af-aa00-fe74ee29576e
patterns:
# Keywords
- name: keyword.control.dockerfile
match: ^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s
- name: keyword.operator.dockerfile
match: ^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s
# String
- name: string.quoted.double.dockerfile
begin: "\""
end: "\""
patterns:
- name: constant.character.escaped.dockerfile
match: \\.
# Comment
- name: comment.block.dockerfile
match: ^\s*#.*$
...
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Dockerfile</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s</string>
<key>name</key>
<string>keyword.control.dockerfile</string>
</dict>
<dict>
<key>match</key>
<string>^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s</string>
<key>name</key>
<string>keyword.operator.dockerfile</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.quoted.double.dockerfile</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>constant.character.escaped.dockerfile</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>^\s*#.*$</string>
<key>name</key>
<string>comment.block.dockerfile</string>
</dict>
</array>
<key>scopeName</key>
<string>source.dockerfile</string>
<key>uuid</key>
<string>a39d8795-59d2-49af-aa00-fe74ee29576e</string>
</dict>
</plist>
@@ -0,0 +1 @@
Asbjorn Enge <asbjorn@hanafjedle.net> (@asbjornenge)
+9
View File
@@ -0,0 +1,9 @@
# Dockerfile.tmLanguage
Pretty basic Dockerfile.tmLanguage for Sublime Text syntax highlighting.
PR's with syntax updates, suggestions etc. are all very much appreciated!
I'll get to making this installable via Package Control soon!
enjoy.
+1
View File
@@ -0,0 +1 @@
Tianon Gravi <admwiggin@gmail.com> (@tianon)
+543
View File
@@ -0,0 +1,543 @@
#!bash
#
# bash completion file for core docker commands
#
# This script provides supports completion of:
# - commands and their options
# - container ids
# - image repos and tags
# - filepaths
#
# To enable the completions either:
# - place this file in /etc/bash_completion.d
# or
# - copy this file and add the line below to your .bashrc after
# bash completion features are loaded
# . docker.bash
#
# Note:
# Currently, the completions will not work if the docker daemon is not
# bound to the default communication port/socket
# If the docker daemon is using a unix socket for communication your user
# must have access to the socket for the completions to function correctly
__docker_containers_all()
{
local containers
containers="$( docker ps -a -q )"
COMPREPLY=( $( compgen -W "$containers" -- "$cur" ) )
}
__docker_containers_running()
{
local containers
containers="$( docker ps -q )"
COMPREPLY=( $( compgen -W "$containers" -- "$cur" ) )
}
__docker_containers_stopped()
{
local containers
containers="$( comm -13 <(docker ps -q | sort -u) <(docker ps -a -q | sort -u) )"
COMPREPLY=( $( compgen -W "$containers" -- "$cur" ) )
}
__docker_image_repos()
{
local repos
repos="$( docker images | awk 'NR>1{print $1}' )"
COMPREPLY=( $( compgen -W "$repos" -- "$cur" ) )
}
__docker_images()
{
local images
images="$( docker images | awk 'NR>1{print $1":"$2}' )"
COMPREPLY=( $( compgen -W "$images" -- "$cur" ) )
__ltrim_colon_completions "$cur"
}
__docker_image_repos_and_tags()
{
local repos images
repos="$( docker images | awk 'NR>1{print $1}' )"
images="$( docker images | awk 'NR>1{print $1":"$2}' )"
COMPREPLY=( $( compgen -W "$repos $images" -- "$cur" ) )
__ltrim_colon_completions "$cur"
}
__docker_containers_and_images()
{
local containers images
containers="$( docker ps -a -q )"
images="$( docker images | awk 'NR>1{print $1":"$2}' )"
COMPREPLY=( $( compgen -W "$images $containers" -- "$cur" ) )
__ltrim_colon_completions "$cur"
}
_docker_docker()
{
case "$prev" in
-H)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-H" -- "$cur" ) )
;;
*)
COMPREPLY=( $( compgen -W "$commands help" -- "$cur" ) )
;;
esac
}
_docker_attach()
{
if [ $cpos -eq $cword ]; then
__docker_containers_running
fi
}
_docker_build()
{
case "$prev" in
-t)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-no-cache -t -q -rm" -- "$cur" ) )
;;
*)
_filedir
;;
esac
}
_docker_commit()
{
case "$prev" in
-author|-m|-run)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-author -m -run" -- "$cur" ) )
;;
*)
local counter=$cpos
while [ $counter -le $cword ]; do
case "${words[$counter]}" in
-author|-m|-run)
(( counter++ ))
;;
-*)
;;
*)
break
;;
esac
(( counter++ ))
done
if [ $counter -eq $cword ]; then
__docker_containers_all
fi
;;
esac
}
_docker_cp()
{
if [ $cpos -eq $cword ]; then
__docker_containers_all
else
_filedir
fi
}
_docker_diff()
{
if [ $cpos -eq $cword ]; then
__docker_containers_all
fi
}
_docker_events()
{
case "$prev" in
-since)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-since" -- "$cur" ) )
;;
*)
;;
esac
}
_docker_export()
{
if [ $cpos -eq $cword ]; then
__docker_containers_all
fi
}
_docker_help()
{
if [ $cpos -eq $cword ]; then
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
fi
}
_docker_history()
{
if [ $cpos -eq $cword ]; then
__docker_image_repos_and_tags
fi
}
_docker_images()
{
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-a -notrunc -q -viz" -- "$cur" ) )
;;
*)
local counter=$cpos
while [ $counter -le $cword ]; do
case "${words[$counter]}" in
-*)
;;
*)
break
;;
esac
(( counter++ ))
done
if [ $counter -eq $cword ]; then
__docker_image_repos
fi
;;
esac
}
_docker_import()
{
return
}
_docker_info()
{
return
}
_docker_insert()
{
if [ $cpos -eq $cword ]; then
__docker_image_repos_and_tags
fi
}
_docker_inspect()
{
__docker_containers_and_images
}
_docker_kill()
{
__docker_containers_running
}
_docker_login()
{
case "$prev" in
-e|-p|-u)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-e -p -u" -- "$cur" ) )
;;
*)
;;
esac
}
_docker_logs()
{
if [ $cpos -eq $cword ]; then
__docker_containers_all
fi
}
_docker_port()
{
if [ $cpos -eq $cword ]; then
__docker_containers_all
fi
}
_docker_ps()
{
case "$prev" in
-beforeId|-n|-sinceId)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-a -beforeId -l -n -notrunc -q -s -sinceId" -- "$cur" ) )
;;
*)
;;
esac
}
_docker_pull()
{
case "$prev" in
-t)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-t" -- "$cur" ) )
;;
*)
;;
esac
}
_docker_push()
{
__docker_image_repos
}
_docker_restart()
{
case "$prev" in
-t)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-t" -- "$cur" ) )
;;
*)
__docker_containers_all
;;
esac
}
_docker_rm()
{
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-v" -- "$cur" ) )
;;
*)
__docker_containers_stopped
;;
esac
}
_docker_rmi()
{
__docker_image_repos_and_tags
}
_docker_run()
{
case "$prev" in
-cidfile)
_filedir
;;
-volumes-from)
__docker_containers_all
;;
-a|-c|-dns|-e|-entrypoint|-h|-lxc-conf|-m|-p|-u|-v|-w)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-a -c -cidfile -d -dns -e -entrypoint -h -i -lxc-conf -m -n -p -privileged -t -u -v -volumes-from -w" -- "$cur" ) )
;;
*)
local counter=$cpos
while [ $counter -le $cword ]; do
case "${words[$counter]}" in
-a|-c|-cidfile|-dns|-e|-entrypoint|-h|-lxc-conf|-m|-p|-u|-v|-volumes-from|-w)
(( counter++ ))
;;
-*)
;;
*)
break
;;
esac
(( counter++ ))
done
if [ $counter -eq $cword ]; then
__docker_image_repos_and_tags
fi
;;
esac
}
_docker_search()
{
COMPREPLY=( $( compgen -W "-notrunc" -- "$cur" ) )
}
_docker_start()
{
__docker_containers_stopped
}
_docker_stop()
{
case "$prev" in
-t)
return
;;
*)
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-t" -- "$cur" ) )
;;
*)
__docker_containers_running
;;
esac
}
_docker_tag()
{
COMPREPLY=( $( compgen -W "-f" -- "$cur" ) )
}
_docker_top()
{
if [ $cpos -eq $cword ]; then
__docker_containers_running
fi
}
_docker_version()
{
return
}
_docker_wait()
{
__docker_containers_all
}
_docker()
{
local cur prev words cword command="docker" counter=1 word cpos
local commands="
attach
build
commit
cp
diff
events
export
history
images
import
info
insert
inspect
kill
login
logs
port
ps
pull
push
restart
rm
rmi
run
search
start
stop
tag
top
version
wait
"
COMPREPLY=()
_get_comp_words_by_ref -n : cur prev words cword
while [ $counter -lt $cword ]; do
word="${words[$counter]}"
case "$word" in
-H)
(( counter++ ))
;;
-*)
;;
*)
command="$word"
cpos=$counter
(( cpos++ ))
break
;;
esac
(( counter++ ))
done
local completions_func=_docker_${command}
declare -F $completions_func >/dev/null && $completions_func
return 0
}
complete -F _docker docker
+242
View File
@@ -0,0 +1,242 @@
#compdef docker
#
# zsh completion for docker (http://docker.io)
#
# version: 0.2.2
# author: Felix Riedel
# license: BSD License
# github: https://github.com/felixr/docker-zsh-completion
#
__parse_docker_list() {
sed -e '/^ID/d' -e 's/[ ]\{2,\}/|/g' -e 's/ \([hdwm]\)\(inutes\|ays\|ours\|eeks\)/\1/' | awk ' BEGIN {FS="|"} { printf("%s:%7s, %s\n", $1, $4, $2)}'
}
__docker_stoppedcontainers() {
local expl
declare -a stoppedcontainers
stoppedcontainers=(${(f)"$(docker ps -a | grep --color=never 'Exit' | __parse_docker_list )"})
_describe -t containers-stopped "Stopped Containers" stoppedcontainers
}
__docker_runningcontainers() {
local expl
declare -a containers
containers=(${(f)"$(docker ps | __parse_docker_list)"})
_describe -t containers-active "Running Containers" containers
}
__docker_containers () {
__docker_stoppedcontainers
__docker_runningcontainers
}
__docker_images () {
local expl
declare -a images
images=(${(f)"$(docker images | awk '(NR > 1){printf("%s\\:%s\n", $1,$2)}')"})
images=($images ${(f)"$(docker images | awk '(NR > 1){printf("%s:%-15s in %s\n", $3,$2,$1)}')"})
_describe -t docker-images "Images" images
}
__docker_tags() {
local expl
declare -a tags
tags=(${(f)"$(docker images | awk '(NR>1){print $2}'| sort | uniq)"})
_describe -t docker-tags "tags" tags
}
__docker_search() {
# declare -a dockersearch
local cache_policy
zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
if [[ -z "$cache_policy" ]]; then
zstyle ":completion:${curcontext}:" cache-policy __docker_caching_policy
fi
local searchterm cachename
searchterm="${words[$CURRENT]%/}"
cachename=_docker-search-$searchterm
local expl
local -a result
if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \
&& ! _retrieve_cache ${cachename#_}; then
_message "Searching for ${searchterm}..."
result=(${(f)"$(docker search ${searchterm} | awk '(NR>2){print $1}')"})
_store_cache ${cachename#_} result
fi
_wanted dockersearch expl 'Available images' compadd -a result
}
__docker_caching_policy()
{
# oldp=( "$1"(Nmh+24) ) # 24 hour
oldp=( "$1"(Nmh+1) ) # 24 hour
(( $#oldp ))
}
__docker_repositories () {
local expl
declare -a repos
repos=(${(f)"$(docker images | sed -e '1d' -e 's/[ ].*//' | sort | uniq)"})
_describe -t docker-repos "Repositories" repos
}
__docker_commands () {
# local -a _docker_subcommands
local cache_policy
zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
if [[ -z "$cache_policy" ]]; then
zstyle ":completion:${curcontext}:" cache-policy __docker_caching_policy
fi
if ( [[ ${+_docker_subcommands} -eq 0 ]] || _cache_invalid docker_subcommands) \
&& ! _retrieve_cache docker_subcommands;
then
_docker_subcommands=(${${(f)"$(_call_program commands
docker 2>&1 | sed -e '1,6d' -e '/^[ ]*$/d' -e 's/[ ]*\([^ ]\+\)\s*\([^ ].*\)/\1:\2/' )"}})
_docker_subcommands=($_docker_subcommands 'help:Show help for a command')
_store_cache docker_subcommands _docker_subcommands
fi
_describe -t docker-commands "docker command" _docker_subcommands
}
__docker_subcommand () {
local -a _command_args
case "$words[1]" in
(attach|wait)
_arguments ':containers:__docker_runningcontainers'
;;
(build)
_arguments \
'-t=-:repository:__docker_repositories' \
':path or URL:_directories'
;;
(commit)
_arguments \
':container:__docker_containers' \
':repository:__docker_repositories' \
':tag: '
;;
(diff|export|logs)
_arguments '*:containers:__docker_containers'
;;
(history)
_arguments '*:images:__docker_images'
;;
(images)
_arguments \
'-a[Show all images]' \
':repository:__docker_repositories'
;;
(inspect)
_arguments '*:containers:__docker_containers'
;;
(history)
_arguments ':images:__docker_images'
;;
(insert)
_arguments '1:containers:__docker_containers' \
'2:URL:(http:// file://)' \
'3:file:_files'
;;
(kill)
_arguments '*:containers:__docker_runningcontainers'
;;
(port)
_arguments '1:containers:__docker_runningcontainers'
;;
(start)
_arguments '*:containers:__docker_stoppedcontainers'
;;
(rm)
_arguments '-v[Remove the volumes associated to the container]' \
'*:containers:__docker_stoppedcontainers'
;;
(rmi)
_arguments '-v[Remove the volumes associated to the container]' \
'*:images:__docker_images'
;;
(top)
_arguments '1:containers:__docker_runningcontainers'
;;
(restart|stop)
_arguments '-t=-[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)' \
'*:containers:__docker_runningcontainers'
;;
(top)
_arguments ':containers:__docker_runningcontainers'
;;
(ps)
_arguments '-a[Show all containers. Only running containers are shown by default]' \
'-h[Show help]' \
'-beforeId=-[Show only container created before Id, include non-running one]:containers:__docker_containers' \
'-n=-[Show n last created containers, include non-running one]:n:(1 5 10 25 50)'
;;
(tag)
_arguments \
'-f[force]'\
':image:__docker_images'\
':repository:__docker_repositories' \
':tag:__docker_tags'
;;
(run)
_arguments \
'-a=-[Attach to stdin, stdout or stderr]:toggle:(true false)' \
'-c=-[CPU shares (relative weight)]:CPU shares: ' \
'-d[Detached mode: leave the container running in the background]' \
'*-dns=[Set custom dns servers]:dns server: ' \
'*-e=[Set environment variables]:environment variable: ' \
'-entrypoint=-[Overwrite the default entrypoint of the image]:entry point: ' \
'-h=-[Container host name]:hostname:_hosts' \
'-i[Keep stdin open even if not attached]' \
'-m=-[Memory limit (in bytes)]:limit: ' \
'*-p=-[Expose a container''s port to the host]:port:_ports' \
'-t=-[Allocate a pseudo-tty]:toggle:(true false)' \
'-u=-[Username or UID]:user:_users' \
'*-v=-[Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)]:volume: '\
'-volumes-from=-[Mount volumes from the specified container]:volume: ' \
'(-):images:__docker_images' \
'(-):command: _command_names -e' \
'*::arguments: _normal'
;;
(pull|search)
_arguments ':name:__docker_search'
;;
(help)
_arguments ':subcommand:__docker_commands'
;;
(*)
_message 'Unknown sub command'
esac
}
_docker () {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
'-H=-[tcp://host:port to bind/connect to]:socket: ' \
'(-): :->command' \
'(-)*:: :->option-or-argument'
if (( CURRENT == 1 )); then
fi
case $state in
(command)
__docker_commands
;;
(option-or-argument)
curcontext=${curcontext%:*:*}:docker-$words[1]:
__docker_subcommand
;;
esac
}
_docker "$@"
+125
View File
@@ -0,0 +1,125 @@
package main
import (
"fmt"
"io"
"log"
"net"
"os"
"os/exec"
"path"
"time"
)
var DOCKERPATH = path.Join(os.Getenv("DOCKERPATH"), "docker")
// WARNING: this crashTest will 1) crash your host, 2) remove all containers
func runDaemon() (*exec.Cmd, error) {
os.Remove("/var/run/docker.pid")
exec.Command("rm", "-rf", "/var/lib/docker/containers").Run()
cmd := exec.Command(DOCKERPATH, "-d")
outPipe, err := cmd.StdoutPipe()
if err != nil {
return nil, err
}
errPipe, err := cmd.StderrPipe()
if err != nil {
return nil, err
}
if err := cmd.Start(); err != nil {
return nil, err
}
go func() {
io.Copy(os.Stdout, outPipe)
}()
go func() {
io.Copy(os.Stderr, errPipe)
}()
return cmd, nil
}
func crashTest() error {
if err := exec.Command("/bin/bash", "-c", "while true; do true; done").Start(); err != nil {
return err
}
var endpoint string
if ep := os.Getenv("TEST_ENDPOINT"); ep == "" {
endpoint = "192.168.56.1:7979"
} else {
endpoint = ep
}
c := make(chan bool)
var conn io.Writer
go func() {
conn, _ = net.Dial("tcp", endpoint)
c <- false
}()
go func() {
time.Sleep(2 * time.Second)
c <- true
}()
<-c
restartCount := 0
totalTestCount := 1
for {
daemon, err := runDaemon()
if err != nil {
return err
}
restartCount++
// time.Sleep(5000 * time.Millisecond)
var stop bool
go func() error {
stop = false
for i := 0; i < 100 && !stop; {
func() error {
cmd := exec.Command(DOCKERPATH, "run", "ubuntu", "echo", fmt.Sprintf("%d", totalTestCount))
i++
totalTestCount++
outPipe, err := cmd.StdoutPipe()
if err != nil {
return err
}
inPipe, err := cmd.StdinPipe()
if err != nil {
return err
}
if err := cmd.Start(); err != nil {
return err
}
if conn != nil {
go io.Copy(conn, outPipe)
}
// Expecting error, do not check
inPipe.Write([]byte("hello world!!!!!\n"))
go inPipe.Write([]byte("hello world!!!!!\n"))
go inPipe.Write([]byte("hello world!!!!!\n"))
inPipe.Close()
if err := cmd.Wait(); err != nil {
return err
}
outPipe.Close()
return nil
}()
}
return nil
}()
time.Sleep(20 * time.Second)
stop = true
if err := daemon.Process.Kill(); err != nil {
return err
}
}
}
func main() {
if err := crashTest(); err != nil {
log.Println(err)
}
}
+27
View File
@@ -0,0 +1,27 @@
#
# This Dockerfile will create an image that allows to generate upstart and
# systemd scripts (more to come)
#
# docker-version 0.6.2
#
FROM ubuntu:12.10
MAINTAINER Guillaume J. Charmes <guillaume@dotcloud.com>
RUN apt-get update && apt-get install -y wget git mercurial
# Install Go
RUN wget --no-check-certificate https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz -O go-1.1.2.tar.gz
RUN tar -xzvf go-1.1.2.tar.gz && mv /go /goroot
RUN mkdir /go
ENV GOROOT /goroot
ENV GOPATH /go
ENV PATH $GOROOT/bin:$PATH
RUN go get github.com/dotcloud/docker && cd /go/src/github.com/dotcloud/docker && git checkout v0.6.3
ADD manager.go /manager/
RUN cd /manager && go build -o /usr/bin/manager
ENTRYPOINT ["/usr/bin/manager"]
+4
View File
@@ -0,0 +1,4 @@
FROM busybox
MAINTAINER Guillaume J. Charmes <guillaume@dotcloud.com>
ADD manager /usr/bin/
ENTRYPOINT ["/usr/bin/manager"]
+130
View File
@@ -0,0 +1,130 @@
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"github.com/dotcloud/docker"
"os"
"strings"
"text/template"
)
var templates = map[string]string{
"upstart": `description "{{.description}}"
author "{{.author}}"
start on filesystem and started lxc-net and started docker
stop on runlevel [!2345]
respawn
exec /home/vagrant/goroot/bin/docker start -a {{.container_id}}
`,
"systemd": `[Unit]
Description={{.description}}
Author={{.author}}
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a {{.container_id}}
ExecStop=/usr/bin/docker stop -t 2 {{.container_id}}
[Install]
WantedBy=local.target
`,
}
func main() {
// Parse command line for custom options
kind := flag.String("t", "upstart", "Type of manager requested")
author := flag.String("a", "<none>", "Author of the image")
description := flag.String("d", "<none>", "Description of the image")
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "\nUsage: manager <container id>\n\n")
flag.PrintDefaults()
}
flag.Parse()
// We require at least the container ID
if flag.NArg() != 1 {
println(flag.NArg())
flag.Usage()
return
}
// Check that the requested process manager is supported
if _, exists := templates[*kind]; !exists {
panic("Unkown script template")
}
// Load the requested template
tpl, err := template.New("processManager").Parse(templates[*kind])
if err != nil {
panic(err)
}
// Create stdout/stderr buffers
bufOut := bytes.NewBuffer(nil)
bufErr := bytes.NewBuffer(nil)
// Instanciate the Docker CLI
cli := docker.NewDockerCli(nil, bufOut, bufErr, "unix", "/var/run/docker.sock")
// Retrieve the container info
if err := cli.CmdInspect(flag.Arg(0)); err != nil {
// As of docker v0.6.3, CmdInspect always returns nil
panic(err)
}
// If there is nothing in the error buffer, then the Docker daemon is there and the container has been found
if bufErr.Len() == 0 {
// Unmarshall the resulting container data
c := []*docker.Container{{}}
if err := json.Unmarshal(bufOut.Bytes(), &c); err != nil {
panic(err)
}
// Reset the buffers
bufOut.Reset()
bufErr.Reset()
// Retrieve the info of the linked image
if err := cli.CmdInspect(c[0].Image); err != nil {
panic(err)
}
// If there is nothing in the error buffer, then the image has been found.
if bufErr.Len() == 0 {
// Unmarshall the resulting image data
img := []*docker.Image{{}}
if err := json.Unmarshal(bufOut.Bytes(), &img); err != nil {
panic(err)
}
// If no author has been set, use the one from the image
if *author == "<none>" && img[0].Author != "" {
*author = strings.Replace(img[0].Author, "\"", "", -1)
}
// If no description has been set, use the comment from the image
if *description == "<none>" && img[0].Comment != "" {
*description = strings.Replace(img[0].Comment, "\"", "", -1)
}
}
}
/// Old version: Wrtie the resulting script to file
// f, err := os.OpenFile(kind, os.O_CREATE|os.O_WRONLY, 0755)
// if err != nil {
// panic(err)
// }
// defer f.Close()
// Create a map with needed data
data := map[string]string{
"author": *author,
"description": *description,
"container_id": flag.Arg(0),
}
// Process the template and output it on Stdout
if err := tpl.Execute(os.Stdout, data); err != nil {
panic(err)
}
}
+53
View File
@@ -0,0 +1,53 @@
#!/bin/sh
set -e
usage() {
echo >&2 "usage: $0 [-a author] [-d description] container [manager]"
echo >&2 " ie: $0 -a 'John Smith' 4ec9612a37cd systemd"
echo >&2 " ie: $0 -d 'Super Cool System' 4ec9612a37cd # defaults to upstart"
exit 1
}
auth='<none>'
desc='<none>'
have_auth=
have_desc=
while getopts a:d: opt; do
case "$opt" in
a)
auth="$OPTARG"
have_auth=1
;;
d)
desc="$OPTARG"
have_desc=1
;;
esac
done
shift $(($OPTIND - 1))
[ $# -ge 1 -a $# -le 2 ] || usage
cid="$1"
script="${2:-upstart}"
if [ ! -e "manager/$script" ]; then
echo >&2 "Error: manager type '$script' is unknown (PRs always welcome!)."
echo >&2 'The currently supported types are:'
echo >&2 " $(cd manager && echo *)"
exit 1
fi
# TODO https://github.com/dotcloud/docker/issues/734 (docker inspect formatting)
#if command -v docker > /dev/null 2>&1; then
# image="$(docker inspect -f '{{.Image}}' "$cid")"
# if [ "$image" ]; then
# if [ -z "$have_auth" ]; then
# auth="$(docker inspect -f '{{.Author}}' "$image")"
# fi
# if [ -z "$have_desc" ]; then
# desc="$(docker inspect -f '{{.Comment}}' "$image")"
# fi
# fi
#fi
exec "manager/$script" "$cid" "$auth" "$desc"
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
set -e
cid="$1"
auth="$2"
desc="$3"
cat <<-EOF
[Unit]
Description=$desc
Author=$auth
After=docker.service
[Service]
ExecStart=/usr/bin/docker start -a $cid
ExecStop=/usr/bin/docker stop -t 2 $cid
[Install]
WantedBy=local.target
EOF
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -e
cid="$1"
auth="$2"
desc="$3"
cat <<-EOF
description "$(echo "$desc" | sed 's/"/\\"/g')"
author "$(echo "$auth" | sed 's/"/\\"/g')"
start on filesystem and started lxc-net and started docker
stop on runlevel [!2345]
respawn
exec /usr/bin/docker start -a "$cid"
EOF
+13
View File
@@ -0,0 +1,13 @@
# /etc/conf.d/docker: config file for /etc/init.d/docker
# where the docker daemon output gets piped
#DOCKER_LOGFILE="/var/log/docker.log"
# where docker's pid get stored
#DOCKER_PIDFILE="/run/docker.pid"
# where the docker daemon itself is run from
#DOCKER_BINARY="/usr/bin/docker"
# any other random options you want to pass to docker
DOCKER_OPTS=""
+31
View File
@@ -0,0 +1,31 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log}
DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid}
DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker}
DOCKER_OPTS=${DOCKER_OPTS:-}
start() {
checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
ebegin "Starting docker daemon"
start-stop-daemon --start --background \
--exec "$DOCKER_BINARY" \
--pidfile "$DOCKER_PIDFILE" \
--stdout "$DOCKER_LOGFILE" \
--stderr "$DOCKER_LOGFILE" \
-- -d -p "$DOCKER_PIDFILE" \
$DOCKER_OPTS
eend $?
}
stop() {
ebegin "Stopping docker daemon"
start-stop-daemon --stop \
--exec "$DOCKER_BINARY" \
--pidfile "$DOCKER_PIDFILE"
eend $?
}
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Easily create lightweight, portable, self-sufficient containers from any application!
Documentation=http://docs.docker.io
Requires=network.target
After=multi-user.target
[Service]
Type=simple
ExecStartPre=/bin/mount --make-rprivate /
ExecStart=/usr/bin/docker -d
[Install]
WantedBy=multi-user.target
+85
View File
@@ -0,0 +1,85 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: docker
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Linux container runtime
# Description: Linux container runtime
### END INIT INFO
DOCKER=/usr/bin/docker
DOCKER_PIDFILE=/var/run/docker.pid
DOCKER_OPTS=
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
# Check lxc-docker is present
[ -x $DOCKER ] || (log_failure_msg "docker not present"; exit 1)
# Get lsb functions
. /lib/lsb/init-functions
if [ -f /etc/default/lxc ]; then
. /etc/default/lxc
fi
if [ "$1" = start ] && which initctl >/dev/null && initctl version | grep -q upstart; then
exit 1
fi
check_root_id ()
{
if [ "$(id -u)" != "0" ]; then
log_failure_msg "Docker must be run as root"; exit 1
fi
}
case "$1" in
start)
check_root_id || exit 1
log_begin_msg "Starting Docker"
mount | grep cgroup >/dev/null || mount -t cgroup none /sys/fs/cgroup 2>/dev/null
start-stop-daemon --start --background $NO_CLOSE \
--exec "$DOCKER" \
--pidfile "$DOCKER_PIDFILE" \
-- -d -p "$DOCKER_PIDFILE" \
$DOCKER_OPTS
log_end_msg $?
;;
stop)
check_root_id || exit 1
log_begin_msg "Stopping Docker"
start-stop-daemon --stop \
--pidfile "$DOCKER_PIDFILE"
log_end_msg $?
;;
restart)
check_root_id || exit 1
docker_pid=`cat "$DOCKER_PIDFILE" 2>/dev/null`
[ -n "$docker_pid" ] \
&& ps -p $docker_pid > /dev/null 2>&1 \
&& $0 stop
$0 start
;;
force-reload)
check_root_id || exit 1
$0 restart
;;
status)
status_of_proc -p "$DOCKER_PIDFILE" "$DOCKER" docker
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
+10
View File
@@ -0,0 +1,10 @@
description "Docker daemon"
start on filesystem and started lxc-net
stop on runlevel [!2345]
respawn
script
/usr/bin/docker -d
end script
-55
View File
@@ -1,55 +0,0 @@
#!/bin/sh
# This script is meant for quick & easy install via 'curl URL-OF-SCRIPT | sh'
# Original version by Jeff Lindsay <progrium@gmail.com>
# Revamped by Jerome Petazzoni <jerome@dotcloud.com>
#
# This script canonical location is http://get.docker.io/; to update it, run:
# s3cmd put -m text/x-shellscript -P install.sh s3://get.docker.io/index
echo "Ensuring basic dependencies are installed..."
apt-get -qq update
apt-get -qq install lxc wget bsdtar
echo "Looking in /proc/filesystems to see if we have AUFS support..."
if grep -q aufs /proc/filesystems
then
echo "Found."
else
echo "Ahem, it looks like the current kernel does not support AUFS."
echo "Let's see if we can load the AUFS module with modprobe..."
if modprobe aufs
then
echo "Module loaded."
else
echo "Ahem, things didn't turn out as expected."
KPKG=linux-image-extra-$(uname -r)
echo "Trying to install $KPKG..."
if apt-get -qq install $KPKG
then
echo "Installed."
else
echo "Oops, we couldn't install the -extra kernel."
echo "Are you sure you are running a supported version of Ubuntu?"
echo "Proceeding anyway, but Docker will probably NOT WORK!"
fi
fi
fi
echo "Downloading docker binary and uncompressing into /usr/local/bin..."
curl -s http://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-master.tgz |
tar -C /usr/local/bin --strip-components=1 -zxf- \
docker-master/docker
if [ -f /etc/init/dockerd.conf ]
then
echo "Upstart script already exists."
else
echo "Creating /etc/init/dockerd.conf..."
echo "exec /usr/local/bin/docker -d" > /etc/init/dockerd.conf
fi
echo "Starting dockerd..."
start dockerd > /dev/null
echo "Done."
echo
+67
View File
@@ -0,0 +1,67 @@
#!/bin/bash
# Generate a minimal filesystem for archlinux and load it into the local
# docker as "archlinux"
# requires root
set -e
PACSTRAP=$(which pacstrap)
[ "$PACSTRAP" ] || {
echo "Could not find pacstrap. Run pacman -S arch-install-scripts"
exit 1
}
EXPECT=$(which expect)
[ "$EXPECT" ] || {
echo "Could not find expect. Run pacman -S expect"
exit 1
}
ROOTFS=~/rootfs-arch-$$-$RANDOM
mkdir $ROOTFS
#packages to ignore for space savings
PKGIGNORE=linux,jfsutils,lvm2,cryptsetup,groff,man-db,man-pages,mdadm,pciutils,pcmciautils,reiserfsprogs,s-nail,xfsprogs
expect <<EOF
set timeout 60
set send_slow {1 1}
spawn pacstrap -c -d -G -i $ROOTFS base haveged --ignore $PKGIGNORE
expect {
"Install anyway?" { send n\r; exp_continue }
"(default=all)" { send \r; exp_continue }
"Proceed with installation?" { send "\r"; exp_continue }
"skip the above package" {send "y\r"; exp_continue }
"checking" { exp_continue }
"loading" { exp_continue }
"installing" { exp_continue }
}
EOF
arch-chroot $ROOTFS /bin/sh -c "haveged -w 1024; pacman-key --init; pkill haveged; pacman -Rs --noconfirm haveged; pacman-key --populate archlinux"
arch-chroot $ROOTFS /bin/sh -c "ln -s /usr/share/zoneinfo/UTC /etc/localtime"
cat > $ROOTFS/etc/locale.gen <<DELIM
en_US.UTF-8 UTF-8
en_US ISO-8859-1
DELIM
arch-chroot $ROOTFS locale-gen
arch-chroot $ROOTFS /bin/sh -c 'echo "Server = http://mirrors.kernel.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist'
# udev doesn't work in containers, rebuild /dev
DEV=${ROOTFS}/dev
mv ${DEV} ${DEV}.old
mkdir -p ${DEV}
mknod -m 666 ${DEV}/null c 1 3
mknod -m 666 ${DEV}/zero c 1 5
mknod -m 666 ${DEV}/random c 1 8
mknod -m 666 ${DEV}/urandom c 1 9
mkdir -m 755 ${DEV}/pts
mkdir -m 1777 ${DEV}/shm
mknod -m 666 ${DEV}/tty c 5 0
mknod -m 600 ${DEV}/console c 5 1
mknod -m 666 ${DEV}/tty0 c 4 0
mknod -m 666 ${DEV}/full c 1 7
mknod -m 600 ${DEV}/initctl p
mknod -m 666 ${DEV}/ptmx c 5 2
tar --numeric-owner -C $ROOTFS -c . | docker import - archlinux
docker run -i -t archlinux echo Success.
rm -rf $ROOTFS
+2 -3
View File
@@ -35,6 +35,5 @@ do
cp -a /dev/$X dev
done
tar -cf- . | docker put busybox
docker run -i -a -u root busybox /bin/echo Success.
tar --numeric-owner -cf- . | docker import - busybox
docker run -i -u root busybox /bin/echo Success.
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# Create a CentOS base image for Docker
# From unclejack https://github.com/dotcloud/docker/issues/290
set -e
MIRROR_URL="http://centos.netnitco.net/6.4/os/x86_64/"
MIRROR_URL_UPDATES="http://centos.netnitco.net/6.4/updates/x86_64/"
yum install -y febootstrap xz
febootstrap -i bash -i coreutils -i tar -i bzip2 -i gzip -i vim-minimal -i wget -i patch -i diffutils -i iproute -i yum centos centos64 $MIRROR_URL -u $MIRROR_URL_UPDATES
touch centos64/etc/resolv.conf
touch centos64/sbin/init
tar --numeric-owner -Jcpf centos-64.tar.xz -C centos64 .
+233
View File
@@ -0,0 +1,233 @@
#!/bin/bash
set -e
variant='minbase'
include='iproute,iputils-ping'
arch='amd64' # intentionally undocumented for now
skipDetection=
strictDebootstrap=
justTar=
usage() {
echo >&2
echo >&2 "usage: $0 [options] repo suite [mirror]"
echo >&2
echo >&2 'options: (not recommended)'
echo >&2 " -p set an http_proxy for debootstrap"
echo >&2 " -v $variant # change default debootstrap variant"
echo >&2 " -i $include # change default package includes"
echo >&2 " -d # strict debootstrap (do not apply any docker-specific tweaks)"
echo >&2 " -s # skip version detection and tagging (ie, precise also tagged as 12.04)"
echo >&2 " # note that this will also skip adding universe and/or security/updates to sources.list"
echo >&2 " -t # just create a tarball, especially for dockerbrew (uses repo as tarball name)"
echo >&2
echo >&2 " ie: $0 username/debian squeeze"
echo >&2 " $0 username/debian squeeze http://ftp.uk.debian.org/debian/"
echo >&2
echo >&2 " ie: $0 username/ubuntu precise"
echo >&2 " $0 username/ubuntu precise http://mirrors.melbourne.co.uk/ubuntu/"
echo >&2
echo >&2 " ie: $0 -t precise.tar.bz2 precise"
echo >&2 " $0 -t wheezy.tgz wheezy"
echo >&2 " $0 -t wheezy-uk.tar.xz wheezy http://ftp.uk.debian.org/debian/"
echo >&2
}
# these should match the names found at http://www.debian.org/releases/
debianStable=wheezy
debianUnstable=sid
# this should match the name found at http://releases.ubuntu.com/
ubuntuLatestLTS=precise
while getopts v:i:a:p:dst name; do
case "$name" in
p)
http_proxy="$OPTARG"
;;
v)
variant="$OPTARG"
;;
i)
include="$OPTARG"
;;
a)
arch="$OPTARG"
;;
d)
strictDebootstrap=1
;;
s)
skipDetection=1
;;
t)
justTar=1
;;
?)
usage
exit 0
;;
esac
done
shift $(($OPTIND - 1))
repo="$1"
suite="$2"
mirror="${3:-}" # stick to the default debootstrap mirror if one is not provided
if [ ! "$repo" ] || [ ! "$suite" ]; then
usage
exit 1
fi
# some rudimentary detection for whether we need to "sudo" our docker calls
docker=''
if docker version > /dev/null 2>&1; then
docker='docker'
elif sudo docker version > /dev/null 2>&1; then
docker='sudo docker'
elif command -v docker > /dev/null 2>&1; then
docker='docker'
else
echo >&2 "warning: either docker isn't installed, or your current user cannot run it;"
echo >&2 " this script is not likely to work as expected"
sleep 3
docker='docker' # give us a command-not-found later
fi
# make sure we have an absolute path to our final tarball so we can still reference it properly after we change directory
if [ "$justTar" ]; then
if [ ! -d "$(dirname "$repo")" ]; then
echo >&2 "error: $(dirname "$repo") does not exist"
exit 1
fi
repo="$(cd "$(dirname "$repo")" && pwd -P)/$(basename "$repo")"
fi
# will be filled in later, if [ -z "$skipDetection" ]
lsbDist=''
target="/tmp/docker-rootfs-debootstrap-$suite-$$-$RANDOM"
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
returnTo="$(pwd -P)"
set -x
# bootstrap
mkdir -p "$target"
sudo http_proxy=$http_proxy debootstrap --verbose --variant="$variant" --include="$include" --arch="$arch" "$suite" "$target" "$mirror"
cd "$target"
if [ -z "$strictDebootstrap" ]; then
# prevent init scripts from running during install/update
# policy-rc.d (for most scripts)
echo $'#!/bin/sh\nexit 101' | sudo tee usr/sbin/policy-rc.d > /dev/null
sudo chmod +x usr/sbin/policy-rc.d
# initctl (for some pesky upstart scripts)
sudo chroot . dpkg-divert --local --rename --add /sbin/initctl
sudo ln -sf /bin/true sbin/initctl
# see https://github.com/dotcloud/docker/issues/446#issuecomment-16953173
# shrink the image, since apt makes us fat (wheezy: ~157.5MB vs ~120MB)
sudo chroot . apt-get clean
# while we're at it, apt is unnecessarily slow inside containers
# this forces dpkg not to call sync() after package extraction and speeds up install
# the benefit is huge on spinning disks, and the penalty is nonexistent on SSD or decent server virtualization
echo 'force-unsafe-io' | sudo tee etc/dpkg/dpkg.cfg.d/02apt-speedup > /dev/null
# we want to effectively run "apt-get clean" after every install to keep images small
echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' | sudo tee etc/apt/apt.conf.d/no-cache > /dev/null
# helpful undo lines for each the above tweaks (for lack of a better home to keep track of them):
# rm /usr/sbin/policy-rc.d
# rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl
# rm /etc/dpkg/dpkg.cfg.d/02apt-speedup
# rm /etc/apt/apt.conf.d/no-cache
if [ -z "$skipDetection" ]; then
# see also rudimentary platform detection in hack/install.sh
lsbDist=''
if [ -r etc/lsb-release ]; then
lsbDist="$(. etc/lsb-release && echo "$DISTRIB_ID")"
fi
if [ -z "$lsbDist" ] && [ -r etc/debian_version ]; then
lsbDist='Debian'
fi
case "$lsbDist" in
Debian)
# add the updates and security repositories
if [ "$suite" != "$debianUnstable" -a "$suite" != 'unstable' ]; then
# ${suite}-updates only applies to non-unstable
sudo sed -i "p; s/ $suite main$/ ${suite}-updates main/" etc/apt/sources.list
# same for security updates
echo "deb http://security.debian.org/ $suite/updates main" | sudo tee -a etc/apt/sources.list > /dev/null
fi
;;
Ubuntu)
# add the universe, updates, and security repositories
sudo sed -i "
s/ $suite main$/ $suite main universe/; p;
s/ $suite main/ ${suite}-updates main/; p;
s/ $suite-updates main/ ${suite}-security main/
" etc/apt/sources.list
;;
esac
fi
fi
if [ "$justTar" ]; then
# create the tarball file so it has the right permissions (ie, not root)
touch "$repo"
# fill the tarball
sudo tar --numeric-owner -caf "$repo" .
else
# create the image (and tag $repo:$suite)
sudo tar --numeric-owner -c . | $docker import - $repo $suite
# test the image
$docker run -i -t $repo:$suite echo success
if [ -z "$skipDetection" ]; then
case "$lsbDist" in
Debian)
if [ "$suite" = "$debianStable" -o "$suite" = 'stable' ] && [ -r etc/debian_version ]; then
# tag latest
$docker tag $repo:$suite $repo latest
if [ -r etc/debian_version ]; then
# tag the specific debian release version (which is only reasonable to tag on debian stable)
ver=$(cat etc/debian_version)
$docker tag $repo:$suite $repo $ver
fi
fi
;;
Ubuntu)
if [ "$suite" = "$ubuntuLatestLTS" ]; then
# tag latest
$docker tag $repo:$suite $repo latest
fi
if [ -r etc/lsb-release ]; then
lsbRelease="$(. etc/lsb-release && echo "$DISTRIB_RELEASE")"
if [ "$lsbRelease" ]; then
# tag specific Ubuntu version number, if available (12.04, etc.)
$docker tag $repo:$suite $repo $lsbRelease
fi
fi
;;
esac
fi
fi
# cleanup
cd "$returnTo"
sudo rm -rf "$target"
+49
View File
@@ -0,0 +1,49 @@
#!/bin/bash
# Generate a very minimal filesystem based on busybox-static,
# and load it into the local docker under the name "docker-ut".
missing_pkg() {
echo "Sorry, I could not locate $1"
echo "Try 'apt-get install ${2:-$1}'?"
exit 1
}
BUSYBOX=$(which busybox)
[ "$BUSYBOX" ] || missing_pkg busybox busybox-static
SOCAT=$(which socat)
[ "$SOCAT" ] || missing_pkg socat
shopt -s extglob
set -ex
ROOTFS=`mktemp -d /tmp/rootfs-busybox.XXXXXXXXXX`
trap "rm -rf $ROOTFS" INT QUIT TERM
cd $ROOTFS
mkdir bin etc dev dev/pts lib proc sys tmp
touch etc/resolv.conf
cp /etc/nsswitch.conf etc/nsswitch.conf
echo root:x:0:0:root:/:/bin/sh > etc/passwd
echo daemon:x:1:1:daemon:/usr/sbin:/bin/sh >> etc/passwd
echo root:x:0: > etc/group
echo daemon:x:1: >> etc/group
ln -s lib lib64
ln -s bin sbin
cp $BUSYBOX $SOCAT bin
for X in $(busybox --list)
do
ln -s busybox bin/$X
done
rm bin/init
ln bin/busybox bin/init
cp -P /lib/x86_64-linux-gnu/lib{pthread*,c*(-*),dl*(-*),nsl*(-*),nss_*,util*(-*),wrap,z}.so* lib
cp /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 lib
cp -P /usr/lib/x86_64-linux-gnu/lib{crypto,ssl}.so* lib
for X in console null ptmx random stdin stdout stderr tty urandom zero
do
cp -a /dev/$X dev
done
chmod 0755 $ROOTFS # See #486
tar --numeric-owner -cf- . | docker import - docker-ut
docker run -i -u root docker-ut /bin/echo Success.
rm -rf $ROOTFS
+3
View File
@@ -0,0 +1,3 @@
# Vagrant-docker
This is a placeholder for the official vagrant-docker, a plugin for Vagrant (http://vagrantup.com) which exposes Docker as a provider.
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2013 Honza Pokorny
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+23
View File
@@ -0,0 +1,23 @@
dockerfile.vim
==============
Syntax highlighting for Dockerfiles
Installation
------------
Via pathogen, the usual way...
Features
--------
The syntax highlighting includes:
* The directives (e.g. `FROM`)
* Strings
* Comments
License
-------
BSD, short and sweet
+18
View File
@@ -0,0 +1,18 @@
*dockerfile.txt* Syntax highlighting for Dockerfiles
Author: Honza Pokorny <http://honza.ca>
License: BSD
INSTALLATION *installation*
Drop it on your Pathogen path and you're all set.
FEATURES *features*
The syntax highlighting includes:
* The directives (e.g. FROM)
* Strings
* Comments
vim:tw=78:et:ft=help:norl:
@@ -0,0 +1 @@
au BufNewFile,BufRead Dockerfile set filetype=dockerfile
+24
View File
@@ -0,0 +1,24 @@
" dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer: Honza Pokorny <http://honza.ca>
" Version: 0.5
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "dockerfile"
syntax case ignore
syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s/
highlight link dockerfileKeyword Keyword
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
highlight link dockerfileString String
syntax match dockerfileComment "\v^\s*#.*$"
highlight link dockerfileComment Comment
set commentstring=#\ %s
-1
View File
@@ -1 +0,0 @@
../Makefile
-1
View File
@@ -1 +0,0 @@
../README.md
-5
View File
@@ -1,5 +0,0 @@
dotcloud-docker (1) precise; urgency=low
* Initial release
-- dotCloud <ops@dotcloud.com> Mon, 14 Mar 2013 04:43:21 -0700
-1
View File
@@ -1 +0,0 @@
8
-20
View File
@@ -1,20 +0,0 @@
Source: dotcloud-docker
Section: misc
Priority: extra
Homepage: https://github.com/dotcloud/docker
Maintainer: Daniel Mizyrycki <daniel@dotcloud.com>
Build-Depends: debhelper (>= 8.0.0), pkg-config, git, golang, libsqlite3-dev
Vcs-Git: https://github.com/dotcloud/docker.git
Standards-Version: 3.9.2
Package: dotcloud-docker
Architecture: amd64
Provides: dotcloud-docker
Depends: lxc, wget, bsdtar, curl, sqlite3
Conflicts: docker
Description: A process manager with superpowers
It encapsulates heterogeneous payloads in Standard Containers, and runs
them on any server with strong guarantees of isolation and repeatability.
Is is a great building block for automating distributed systems:
large-scale web deployments, database clusters, continuous deployment
systems, private PaaS, service-oriented architectures, etc.
-209
View File
@@ -1,209 +0,0 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: dotcloud-docker
Source: https://github.com/dotcloud/docker
Files: *
Copyright: 2012 DotCloud Inc (opensource@dotcloud.com)
License: Apache License Version 2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2012 DotCloud Inc (opensource@dotcloud.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-1
View File
@@ -1 +0,0 @@
README.md
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
-1
View File
@@ -1 +0,0 @@
3.0 (quilt)
-10
View File
@@ -1,10 +0,0 @@
description "Run docker"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
respawn
script
test -f /etc/default/locale && . /etc/default/locale || true
LANG=$LANG LC_ALL=$LANG /usr/bin/docker -d
end script
-10
View File
@@ -1,10 +0,0 @@
description "Run docker"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
respawn
script
test -f /etc/default/locale && . /etc/default/locale || true
LANG=$LANG LC_ALL=$LANG /usr/bin/docker -d
end script
-161
View File
@@ -1,161 +0,0 @@
package docker
import (
"container/list"
"fmt"
"github.com/dotcloud/docker/fs"
"io/ioutil"
"log"
"os"
"path"
"sort"
)
type Docker struct {
root string
repository string
containers *list.List
networkManager *NetworkManager
Store *fs.Store
}
func (docker *Docker) List() []*Container {
containers := new(History)
for e := docker.containers.Front(); e != nil; e = e.Next() {
containers.Add(e.Value.(*Container))
}
return *containers
}
func (docker *Docker) getContainerElement(id string) *list.Element {
for e := docker.containers.Front(); e != nil; e = e.Next() {
container := e.Value.(*Container)
if container.Id == id {
return e
}
}
return nil
}
func (docker *Docker) Get(id string) *Container {
e := docker.getContainerElement(id)
if e == nil {
return nil
}
return e.Value.(*Container)
}
func (docker *Docker) Exists(id string) bool {
return docker.Get(id) != nil
}
func (docker *Docker) Create(id string, command string, args []string, image *fs.Image, config *Config) (*Container, error) {
if docker.Exists(id) {
return nil, fmt.Errorf("Container %v already exists", id)
}
root := path.Join(docker.repository, id)
container, err := createContainer(id, root, command, args, image, config, docker.networkManager)
if err != nil {
return nil, err
}
docker.containers.PushBack(container)
return container, nil
}
func (docker *Docker) Destroy(container *Container) error {
element := docker.getContainerElement(container.Id)
if element == nil {
return fmt.Errorf("Container %v not found - maybe it was already destroyed?", container.Id)
}
if err := container.Stop(); err != nil {
return err
}
if container.Mountpoint.Mounted() {
if err := container.Mountpoint.Umount(); err != nil {
return fmt.Errorf("Unable to umount container %v: %v", container.Id, err)
}
}
if err := container.Mountpoint.Deregister(); err != nil {
return fmt.Errorf("Unable to deregiser -- ? mountpoint %v: %v", container.Mountpoint.Root, err)
}
if err := os.RemoveAll(container.Root); err != nil {
return fmt.Errorf("Unable to remove filesystem for %v: %v", container.Id, err)
}
docker.containers.Remove(element)
return nil
}
func (docker *Docker) restore() error {
dir, err := ioutil.ReadDir(docker.repository)
if err != nil {
return err
}
for _, v := range dir {
container, err := loadContainer(docker.Store, path.Join(docker.repository, v.Name()), docker.networkManager)
if err != nil {
log.Printf("Failed to load container %v: %v", v.Name(), err)
continue
}
docker.containers.PushBack(container)
}
return nil
}
func New() (*Docker, error) {
return NewFromDirectory("/var/lib/docker")
}
func NewFromDirectory(root string) (*Docker, error) {
docker_repo := path.Join(root, "containers")
if err := os.MkdirAll(docker_repo, 0700); err != nil && !os.IsExist(err) {
return nil, err
}
store, err := fs.New(path.Join(root, "images"))
if err != nil {
return nil, err
}
netManager, err := newNetworkManager(networkBridgeIface)
if err != nil {
return nil, err
}
docker := &Docker{
root: root,
repository: docker_repo,
containers: list.New(),
Store: store,
networkManager: netManager,
}
if err := docker.restore(); err != nil {
return nil, err
}
return docker, nil
}
type History []*Container
func (history *History) Len() int {
return len(*history)
}
func (history *History) Less(i, j int) bool {
containers := *history
return containers[j].When().Before(containers[i].When())
}
func (history *History) Swap(i, j int) {
containers := *history
tmp := containers[i]
containers[i] = containers[j]
containers[j] = tmp
}
func (history *History) Add(container *Container) {
*history = append(*history, container)
sort.Sort(history)
}
+155 -55
View File
@@ -2,91 +2,191 @@ package main
import (
"flag"
"fmt"
"github.com/dotcloud/docker"
"github.com/dotcloud/docker/future"
"github.com/dotcloud/docker/rcli"
"github.com/dotcloud/docker/term"
"io"
"github.com/dotcloud/docker/sysinit"
"github.com/dotcloud/docker/utils"
"io/ioutil"
"log"
"net"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
)
var (
GITCOMMIT string
VERSION string
)
func main() {
if docker.SelfPath() == "/sbin/init" {
if selfPath := utils.SelfPath(); selfPath == "/sbin/init" || selfPath == "/.dockerinit" {
// Running in init mode
docker.SysInit()
sysinit.SysInit()
return
}
fl_daemon := flag.Bool("d", false, "Daemon mode")
// FIXME: Switch d and D ? (to be more sshd like)
flVersion := flag.Bool("v", false, "Print version information and quit")
flDaemon := flag.Bool("d", false, "Daemon mode")
flDebug := flag.Bool("D", false, "Debug mode")
flAutoRestart := flag.Bool("r", true, "Restart previously running containers")
bridgeName := flag.String("b", "", "Attach containers to a pre-existing network bridge. Use 'none' to disable container networking")
pidfile := flag.String("p", "/var/run/docker.pid", "File containing process PID")
flGraphPath := flag.String("g", "/var/lib/docker", "Path to graph storage base dir.")
flEnableCors := flag.Bool("api-enable-cors", false, "Enable CORS requests in the remote api.")
flDns := flag.String("dns", "", "Set custom dns servers")
flHosts := utils.ListOpts{fmt.Sprintf("unix://%s", docker.DEFAULTUNIXSOCKET)}
flag.Var(&flHosts, "H", "tcp://host:port to bind/connect to or unix://path/to/socket to use")
flEnableIptables := flag.Bool("iptables", true, "Disable iptables within docker")
flDefaultIp := flag.String("ip", "0.0.0.0", "Default ip address to use when binding a containers ports")
flInterContainerComm := flag.Bool("icc", true, "Enable inter-container communication")
flag.Parse()
if *fl_daemon {
if *flVersion {
showVersion()
return
}
if len(flHosts) > 1 {
flHosts = flHosts[1:] //trick to display a nice default value in the usage
}
for i, flHost := range flHosts {
host, err := utils.ParseHost(docker.DEFAULTHTTPHOST, docker.DEFAULTHTTPPORT, flHost)
if err == nil {
flHosts[i] = host
} else {
log.Fatal(err)
}
}
bridge := docker.DefaultNetworkBridge
if *bridgeName != "" {
bridge = *bridgeName
}
if *flDebug {
os.Setenv("DEBUG", "1")
}
docker.GITCOMMIT = GITCOMMIT
docker.VERSION = VERSION
if *flDaemon {
if flag.NArg() != 0 {
flag.Usage()
return
}
if err := daemon(); err != nil {
var dns []string
if *flDns != "" {
dns = []string{*flDns}
}
ip := net.ParseIP(*flDefaultIp)
config := &docker.DaemonConfig{
Pidfile: *pidfile,
GraphPath: *flGraphPath,
AutoRestart: *flAutoRestart,
EnableCors: *flEnableCors,
Dns: dns,
EnableIptables: *flEnableIptables,
BridgeIface: bridge,
ProtoAddresses: flHosts,
DefaultIp: ip,
InterContainerCommunication: *flInterContainerComm,
}
if err := daemon(config); err != nil {
log.Fatal(err)
}
} else {
if err := runCommand(flag.Args()); err != nil {
if len(flHosts) > 1 {
log.Fatal("Please specify only one -H")
}
protoAddrParts := strings.SplitN(flHosts[0], "://", 2)
if err := docker.ParseCommands(protoAddrParts[0], protoAddrParts[1], flag.Args()...); err != nil {
if sterr, ok := err.(*utils.StatusError); ok {
os.Exit(sterr.Status)
}
log.Fatal(err)
}
}
}
func daemon() error {
service, err := docker.NewServer()
func showVersion() {
fmt.Printf("Docker version %s, build %s\n", VERSION, GITCOMMIT)
}
func createPidFile(pidfile string) error {
if pidString, err := ioutil.ReadFile(pidfile); err == nil {
pid, err := strconv.Atoi(string(pidString))
if err == nil {
if _, err := os.Stat(fmt.Sprintf("/proc/%d/", pid)); err == nil {
return fmt.Errorf("pid file found, ensure docker is not running or delete %s", pidfile)
}
}
}
file, err := os.Create(pidfile)
if err != nil {
return err
}
return rcli.ListenAndServe("tcp", "127.0.0.1:4242", service)
defer file.Close()
_, err = fmt.Fprintf(file, "%d", os.Getpid())
return err
}
func runCommand(args []string) error {
var oldState *term.State
var err error
if term.IsTerminal(0) && os.Getenv("NORAW") == "" {
oldState, err = term.MakeRaw(0)
func removePidFile(pidfile string) {
if err := os.Remove(pidfile); err != nil {
log.Printf("Error removing %s: %s", pidfile, err)
}
}
func daemon(config *docker.DaemonConfig) error {
if err := createPidFile(config.Pidfile); err != nil {
log.Fatal(err)
}
defer removePidFile(config.Pidfile)
server, err := docker.NewServer(config)
if err != nil {
return err
}
defer server.Close()
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM))
go func() {
sig := <-c
log.Printf("Received signal '%v', exiting\n", sig)
server.Close()
removePidFile(config.Pidfile)
os.Exit(0)
}()
chErrors := make(chan error, len(config.ProtoAddresses))
for _, protoAddr := range config.ProtoAddresses {
protoAddrParts := strings.SplitN(protoAddr, "://", 2)
if protoAddrParts[0] == "unix" {
syscall.Unlink(protoAddrParts[1])
} else if protoAddrParts[0] == "tcp" {
if !strings.HasPrefix(protoAddrParts[1], "127.0.0.1") {
log.Println("/!\\ DON'T BIND ON ANOTHER IP ADDRESS THAN 127.0.0.1 IF YOU DON'T KNOW WHAT YOU'RE DOING /!\\")
}
} else {
server.Close()
removePidFile(config.Pidfile)
log.Fatal("Invalid protocol format.")
}
go func() {
chErrors <- docker.ListenAndServe(protoAddrParts[0], protoAddrParts[1], server, true)
}()
}
for i := 0; i < len(config.ProtoAddresses); i += 1 {
err := <-chErrors
if err != nil {
return err
}
defer term.Restore(0, oldState)
}
// FIXME: we want to use unix sockets here, but net.UnixConn doesn't expose
// CloseWrite(), which we need to cleanly signal that stdin is closed without
// closing the connection.
// See http://code.google.com/p/go/issues/detail?id=3345
if conn, err := rcli.Call("tcp", "127.0.0.1:4242", args...); err == nil {
receive_stdout := future.Go(func() error {
_, err := io.Copy(os.Stdout, conn)
return err
})
send_stdin := future.Go(func() error {
_, err := io.Copy(conn, os.Stdin)
if err := conn.CloseWrite(); err != nil {
log.Printf("Couldn't send EOF: " + err.Error())
}
return err
})
if err := <-receive_stdout; err != nil {
return err
}
if !term.IsTerminal(0) {
if err := <-send_stdin; err != nil {
return err
}
}
} else {
service, err := docker.NewServer()
if err != nil {
return err
}
if err := rcli.LocalCall(service, os.Stdin, os.Stdout, args...); err != nil {
return err
}
}
if oldState != nil {
term.Restore(0, oldState)
}
return nil
}
-319
View File
@@ -1,319 +0,0 @@
package docker
import (
"github.com/dotcloud/docker/fs"
"io"
"io/ioutil"
"os"
"os/exec"
"os/user"
"testing"
)
const testLayerPath string = "/var/lib/docker/docker-ut.tar"
const unitTestImageName string = "busybox"
var unitTestStoreBase string
var srv *Server
func nuke(docker *Docker) error {
return os.RemoveAll(docker.root)
}
func CopyDirectory(source, dest string) error {
if _, err := exec.Command("cp", "-ra", source, dest).Output(); err != nil {
return err
}
return nil
}
func layerArchive(tarfile string) (io.Reader, error) {
// FIXME: need to close f somewhere
f, err := os.Open(tarfile)
if err != nil {
return nil, err
}
return f, nil
}
func init() {
// Hack to run sys init during unit testing
if SelfPath() == "/sbin/init" {
SysInit()
return
}
if usr, err := user.Current(); err != nil {
panic(err)
} else if usr.Uid != "0" {
panic("docker tests needs to be run as root")
}
// Create a temp directory
root, err := ioutil.TempDir("", "docker-test")
if err != nil {
panic(err)
}
unitTestStoreBase = root
// Make it our Store root
docker, err := NewFromDirectory(root)
if err != nil {
panic(err)
}
// Create the "Server"
srv := &Server{
images: docker.Store,
containers: docker,
}
// Retrieve the Image
if err := srv.CmdImport(os.Stdin, os.Stdout, unitTestImageName); err != nil {
panic(err)
}
}
func newTestDocker() (*Docker, error) {
root, err := ioutil.TempDir("", "docker-test")
if err != nil {
return nil, err
}
if err := os.Remove(root); err != nil {
return nil, err
}
if err := CopyDirectory(unitTestStoreBase, root); err != nil {
panic(err)
return nil, err
}
docker, err := NewFromDirectory(root)
if err != nil {
return nil, err
}
return docker, nil
}
func GetTestImage(docker *Docker) *fs.Image {
imgs, err := docker.Store.Images()
if err != nil {
panic(err)
} else if len(imgs) < 1 {
panic("GASP")
}
return imgs[0]
}
func TestCreate(t *testing.T) {
docker, err := newTestDocker()
if err != nil {
t.Fatal(err)
}
defer nuke(docker)
// Make sure we start we 0 containers
if len(docker.List()) != 0 {
t.Errorf("Expected 0 containers, %v found", len(docker.List()))
}
container, err := docker.Create(
"test_create",
"ls",
[]string{"-al"},
GetTestImage(docker),
&Config{},
)
if err != nil {
t.Fatal(err)
}
defer func() {
if err := docker.Destroy(container); err != nil {
t.Error(err)
}
}()
// Make sure we can find the newly created container with List()
if len(docker.List()) != 1 {
t.Errorf("Expected 1 container, %v found", len(docker.List()))
}
// Make sure the container List() returns is the right one
if docker.List()[0].Id != "test_create" {
t.Errorf("Unexpected container %v returned by List", docker.List()[0])
}
// Make sure we can get the container with Get()
if docker.Get("test_create") == nil {
t.Errorf("Unable to get newly created container")
}
// Make sure it is the right container
if docker.Get("test_create") != container {
t.Errorf("Get() returned the wrong container")
}
// Make sure Exists returns it as existing
if !docker.Exists("test_create") {
t.Errorf("Exists() returned false for a newly created container")
}
}
func TestDestroy(t *testing.T) {
docker, err := newTestDocker()
if err != nil {
t.Fatal(err)
}
defer nuke(docker)
container, err := docker.Create(
"test_destroy",
"ls",
[]string{"-al"},
GetTestImage(docker),
&Config{},
)
if err != nil {
t.Fatal(err)
}
// Destroy
if err := docker.Destroy(container); err != nil {
t.Error(err)
}
// Make sure docker.Exists() behaves correctly
if docker.Exists("test_destroy") {
t.Errorf("Exists() returned true")
}
// Make sure docker.List() doesn't list the destroyed container
if len(docker.List()) != 0 {
t.Errorf("Expected 0 container, %v found", len(docker.List()))
}
// Make sure docker.Get() refuses to return the unexisting container
if docker.Get("test_destroy") != nil {
t.Errorf("Unable to get newly created container")
}
// Make sure the container root directory does not exist anymore
_, err = os.Stat(container.Root)
if err == nil || !os.IsNotExist(err) {
t.Errorf("Container root directory still exists after destroy")
}
// Test double destroy
if err := docker.Destroy(container); err == nil {
// It should have failed
t.Errorf("Double destroy did not fail")
}
}
func TestGet(t *testing.T) {
docker, err := newTestDocker()
if err != nil {
t.Fatal(err)
}
defer nuke(docker)
container1, err := docker.Create(
"test1",
"ls",
[]string{"-al"},
GetTestImage(docker),
&Config{},
)
if err != nil {
t.Fatal(err)
}
defer docker.Destroy(container1)
container2, err := docker.Create(
"test2",
"ls",
[]string{"-al"},
GetTestImage(docker),
&Config{},
)
if err != nil {
t.Fatal(err)
}
defer docker.Destroy(container2)
container3, err := docker.Create(
"test3",
"ls",
[]string{"-al"},
GetTestImage(docker),
&Config{},
)
if err != nil {
t.Fatal(err)
}
defer docker.Destroy(container3)
if docker.Get("test1") != container1 {
t.Errorf("Get(test1) returned %v while expecting %v", docker.Get("test1"), container1)
}
if docker.Get("test2") != container2 {
t.Errorf("Get(test2) returned %v while expecting %v", docker.Get("test2"), container2)
}
if docker.Get("test3") != container3 {
t.Errorf("Get(test3) returned %v while expecting %v", docker.Get("test3"), container3)
}
}
func TestRestore(t *testing.T) {
root, err := ioutil.TempDir("", "docker-test")
if err != nil {
t.Fatal(err)
}
if err := os.Remove(root); err != nil {
t.Fatal(err)
}
if err := CopyDirectory(unitTestStoreBase, root); err != nil {
t.Fatal(err)
}
docker1, err := NewFromDirectory(root)
if err != nil {
t.Fatal(err)
}
// Create a container with one instance of docker
container1, err := docker1.Create(
"restore_test",
"ls",
[]string{"-al"},
GetTestImage(docker1),
&Config{},
)
if err != nil {
t.Fatal(err)
}
defer docker1.Destroy(container1)
if len(docker1.List()) != 1 {
t.Errorf("Expected 1 container, %v found", len(docker1.List()))
}
if err := container1.Run(); err != nil {
t.Fatal(err)
}
// Here are are simulating a docker restart - that is, reloading all containers
// from scratch
docker2, err := NewFromDirectory(root)
if err != nil {
t.Fatal(err)
}
defer nuke(docker2)
if len(docker2.List()) != 1 {
t.Errorf("Expected 1 container, %v found", len(docker2.List()))
}
container2 := docker2.Get("restore_test")
if container2 == nil {
t.Fatal("Unable to Get container")
}
if err := container2.Run(); err != nil {
t.Fatal(err)
}
}
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"github.com/dotcloud/docker/sysinit"
)
var (
GITCOMMIT string
VERSION string
)
func main() {
// Running in init mode
sysinit.SysInit()
return
}
+20
View File
@@ -0,0 +1,20 @@
from ubuntu:12.04
maintainer Nick Stinemates
#
# docker build -t docker:docs . && docker run -p 8000:8000 docker:docs
#
run apt-get update
run apt-get install -y python-setuptools make
run easy_install pip
#from docs/requirements.txt, but here to increase cacheability
run pip install Sphinx==1.1.3
run pip install sphinxcontrib-httpdomain==1.1.8
add . /docs
run cd /docs; make docs
expose 8000
workdir /docs/_build/html
entrypoint ["python", "-m", "SimpleHTTPServer"]
+2
View File
@@ -0,0 +1,2 @@
Andy Rothfusz <andy@dotcloud.com> (@metalivedev)
Ken Cochrane <ken@dotcloud.com> (@kencochrane)
+185
View File
@@ -0,0 +1,185 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
PYTHON = python
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sources
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
# @echo " html to make standalone HTML files"
# @echo " dirhtml to make HTML files named index.html in directories"
# @echo " singlehtml to make a single large HTML file"
# @echo " pickle to make pickle files"
# @echo " json to make JSON files"
# @echo " htmlhelp to make HTML files and a HTML help project"
# @echo " qthelp to make HTML files and a qthelp project"
# @echo " devhelp to make HTML files and a Devhelp project"
# @echo " epub to make an epub"
# @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
# @echo " latexpdf to make LaTeX files and run them through pdflatex"
# @echo " text to make text files"
# @echo " man to make manual pages"
# @echo " texinfo to make Texinfo files"
# @echo " info to make Texinfo files and run them through makeinfo"
# @echo " gettext to make PO message catalogs"
# @echo " changes to make an overview of all changed/added/deprecated items"
# @echo " linkcheck to check all external links for integrity"
# @echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " docs to build the docs and copy the static files to the outputdir"
@echo " server to serve the docs in your browser under \`http://localhost:8000\`"
@echo " publish to publish the app to dotcloud"
clean:
-rm -rf $(BUILDDIR)/*
docs:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The documentation pages are now in $(BUILDDIR)/html."
server: docs
@cd $(BUILDDIR)/html; $(PYTHON) -m SimpleHTTPServer 8000
site:
cp -r website $(BUILDDIR)/
cp -r theme/docker/static/ $(BUILDDIR)/website/
@echo
@echo "The Website pages are in $(BUILDDIR)/site."
connect:
@echo connecting dotcloud to www.docker.io website, make sure to use user 1
@echo or create your own "dockerwebsite" app
@cd $(BUILDDIR)/website/ ; \
dotcloud connect dockerwebsite ; \
dotcloud list
push:
@cd $(BUILDDIR)/website/ ; \
dotcloud push
$(VERSIONS):
@echo "Hello world"
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Docker.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Docker.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Docker"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Docker"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
+143
View File
@@ -0,0 +1,143 @@
Docker Documentation
====================
Overview
--------
The source for Docker documentation is here under ``sources/`` in the
form of .rst files. These files use
[reStructuredText](http://docutils.sourceforge.net/rst.html)
formatting with [Sphinx](http://sphinx-doc.org/) extensions for
structure, cross-linking and indexing.
The HTML files are built and hosted on
[readthedocs.org](https://readthedocs.org/projects/docker/), appearing
via proxy on https://docs.docker.io. The HTML files update
automatically after each change to the master or release branch of the
[docker files on GitHub](https://github.com/dotcloud/docker) thanks to
post-commit hooks. The "release" branch maps to the "latest"
documentation and the "master" branch maps to the "master"
documentation.
**Warning**: The "master" documentation may include features not yet
part of any official docker release. "Master" docs should be used only
for understanding bleeding-edge development and "latest" should be
used for the latest official release.
If you need to manually trigger a build of an existing branch, then
you can do that through the [readthedocs
interface](https://readthedocs.org/builds/docker/). If you would like
to add new build targets, including new branches or tags, then you
must contact one of the existing maintainers and get your
readthedocs.org account added to the maintainers list, or just file an
issue on GitHub describing the branch/tag and why it needs to be added
to the docs, and one of the maintainers will add it for you.
Getting Started
---------------
To edit and test the docs, you'll need to install the Sphinx tool and
its dependencies. There are two main ways to install this tool:
###Native Installation
* Install sphinx: `pip install sphinx`
* Mac OS X: `[sudo] pip-2.7 install sphinx`
* Install sphinx httpdomain contrib package: `pip install sphinxcontrib-httpdomain`
* Mac OS X: `[sudo] pip-2.7 install sphinxcontrib-httpdomain`
* If pip is not available you can probably install it using your favorite package manager as **python-pip**
###Alternative Installation: Docker Container
If you're running ``docker`` on your development machine then you may
find it easier and cleaner to use the Dockerfile. This installs Sphinx
in a container, adds the local ``docs/`` directory and builds the HTML
docs inside the container, even starting a simple HTTP server on port
8000 so that you can connect and see your changes. Just run ``docker
build .`` and run the resulting image. This is the equivalent to
``make clean server`` since each container starts clean.
In the ``docs/`` directory, run:
```docker build -t docker:docs . && docker run -p 8000:8000 docker:docs```
Usage
-----
* Follow the contribution guidelines (``../CONTRIBUTING.md``)
* Work in your own fork of the code, we accept pull requests.
* Change the ``.rst`` files with your favorite editor -- try to keep the
lines short and respect RST and Sphinx conventions.
* Run ``make clean docs`` to clean up old files and generate new ones,
or just ``make docs`` to update after small changes.
* Your static website can now be found in the ``_build`` directory.
* To preview what you have generated run ``make server`` and open
http://localhost:8000/ in your favorite browser.
``make clean docs`` must complete without any warnings or errors.
Working using GitHub's file editor
----------------------------------
Alternatively, for small changes and typos you might want to use
GitHub's built in file editor. It allows you to preview your changes
right online (though there can be some differences between GitHub
markdown and Sphinx RST). Just be careful not to create many commits.
Images
------
When you need to add images, try to make them as small as possible
(e.g. as gif). Usually images should go in the same directory as the
.rst file which references them, or in a subdirectory if one already
exists.
Notes
-----
* For the template the css is compiled from less. When changes are needed they can be compiled using
lessc ``lessc main.less`` or watched using watch-lessc ``watch-lessc -i main.less -o main.css``
Guides on using sphinx
----------------------
* To make links to certain sections create a link target like so:
```
.. _hello_world:
Hello world
===========
This is.. (etc.)
```
The ``_hello_world:`` will make it possible to link to this position
(page and section heading) from all other pages. See the [Sphinx
docs](http://sphinx-doc.org/markup/inline.html#role-ref) for more
information and examples.
* Notes, warnings and alarms
```
# a note (use when something is important)
.. note::
# a warning (orange)
.. warning::
# danger (red, use sparsely)
.. danger::
* Code examples
* Start without $, so it's easy to copy and paste.
* Use "sudo" with docker to ensure that your command is runnable
even if they haven't [used the *docker*
group](http://docs.docker.io/en/latest/use/basics/#why-sudo).
Manpages
--------
* To make the manpages, run ``make man``. Please note there is a bug
in spinx 1.1.3 which makes this fail. Upgrade to the latest version
of Sphinx.
* Then preview the manpage by running ``man _build/man/docker.1``,
where ``_build/man/docker.1`` is the path to the generated manfile
+2
View File
@@ -0,0 +1,2 @@
Sphinx==1.1.3
sphinxcontrib-httpdomain==1.1.8
+1
View File
@@ -0,0 +1 @@
Solomon Hykes <solomon@dotcloud.com> (@shykes)
+5
View File
@@ -0,0 +1,5 @@
This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes:
* The remote API by which a docker node can be queried over HTTP
* The registry API by which a docker node can download and upload container images for storage and sharing
* The index search API by which a docker node can search the public index for images to download
+232
View File
@@ -0,0 +1,232 @@
:title: Remote API
:description: API Documentation for Docker
:keywords: API, Docker, rcli, REST, documentation
.. COMMENT use http://pythonhosted.org/sphinxcontrib-httpdomain/ to
.. document the REST API.
=================
Docker Remote API
=================
1. Brief introduction
=====================
- The Remote API is replacing rcli
- By default the Docker daemon listens on unix:///var/run/docker.sock and the client must have root access to interact with the daemon
- If a group named *docker* exists on your system, docker will apply ownership of the socket to the group
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
- Since API version 1.2, the auth configuration is now handled client
side, so the client has to send the authConfig as POST in
/images/(name)/push
2. Versions
===========
The current version of the API is 1.6
Calling /images/<name>/insert is the same as calling
/v1.6/images/<name>/insert
You can still call an old version of the api using
/v1.0/images/<name>/insert
v1.6
****
Full Documentation
------------------
:doc:`docker_remote_api_v1.6`
What's new
----------
.. http:post:: /containers/(id)/attach
**New!** You can now split stderr from stdout. This is done by prefixing
a header to each transmition. See :http:post:`/containers/(id)/attach`.
The WebSocket attach is unchanged.
Note that attach calls on the previous API version didn't change. Stdout and
stderr are merged.
v1.5
****
Full Documentation
------------------
:doc:`docker_remote_api_v1.5`
What's new
----------
.. http:post:: /images/create
**New!** You can now pass registry credentials (via an AuthConfig object)
through the `X-Registry-Auth` header
.. http:post:: /images/(name)/push
**New!** The AuthConfig object now needs to be passed through
the `X-Registry-Auth` header
.. http:get:: /containers/json
**New!** The format of the `Ports` entry has been changed to a list of
dicts each containing `PublicPort`, `PrivatePort` and `Type` describing a
port mapping.
v1.4
****
Full Documentation
------------------
:doc:`docker_remote_api_v1.4`
What's new
----------
.. http:post:: /images/create
**New!** When pulling a repo, all images are now downloaded in parallel.
.. http:get:: /containers/(id)/top
**New!** You can now use ps args with docker top, like `docker top <container_id> aux`
.. http:get:: /events:
**New!** Image's name added in the events
v1.3
****
docker v0.5.0 51f6c4a_
Full Documentation
------------------
:doc:`docker_remote_api_v1.3`
What's new
----------
.. http:get:: /containers/(id)/top
List the processes running inside a container.
.. http:get:: /events:
**New!** Monitor docker's events via streaming or via polling
Builder (/build):
- Simplify the upload of the build context
- Simply stream a tarball instead of multipart upload with 4
intermediary buffers
- Simpler, less memory usage, less disk usage and faster
.. Warning::
The /build improvements are not reverse-compatible. Pre 1.3 clients
will break on /build.
List containers (/containers/json):
- You can use size=1 to get the size of the containers
Start containers (/containers/<id>/start):
- You can now pass host-specific configuration (e.g. bind mounts) in
the POST body for start calls
v1.2
****
docker v0.4.2 2e7649b_
Full Documentation
------------------
:doc:`docker_remote_api_v1.2`
What's new
----------
The auth configuration is now handled by the client.
The client should send it's authConfig as POST on each call of
/images/(name)/push
.. http:get:: /auth
**Deprecated.**
.. http:post:: /auth
Only checks the configuration but doesn't store it on the server
Deleting an image is now improved, will only untag the image if it
has children and remove all the untagged parents if has any.
.. http:post:: /images/<name>/delete
Now returns a JSON structure with the list of images
deleted/untagged.
v1.1
****
docker v0.4.0 a8ae398_
Full Documentation
------------------
:doc:`docker_remote_api_v1.1`
What's new
----------
.. http:post:: /images/create
.. http:post:: /images/(name)/insert
.. http:post:: /images/(name)/push
Uses json stream instead of HTML hijack, it looks like this:
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: application/json
{"status":"Pushing..."}
{"status":"Pushing", "progress":"1/? (n/a)"}
{"error":"Invalid..."}
...
v1.0
****
docker v0.3.4 8d73740_
Full Documentation
------------------
:doc:`docker_remote_api_v1.0`
What's new
----------
Initial version
.. _a8ae398: https://github.com/dotcloud/docker/commit/a8ae398bf52e97148ee7bd0d5868de2e15bd297f
.. _8d73740: https://github.com/dotcloud/docker/commit/8d73740343778651c09160cde9661f5f387b36f4
.. _2e7649b: https://github.com/dotcloud/docker/commit/2e7649beda7c820793bd46766cbc2cfeace7b168
.. _51f6c4a: https://github.com/dotcloud/docker/commit/51f6c4a7372450d164c61e0054daf0223ddbd909
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+18
View File
@@ -0,0 +1,18 @@
:title: API Documentation
:description: docker documentation
:keywords: docker, ipa, documentation
APIs
====
Your programs and scripts can access Docker's functionality via these interfaces:
.. toctree::
:maxdepth: 3
registry_index_spec
registry_api
index_api
docker_remote_api
remote_api_client_libraries
+556
View File
@@ -0,0 +1,556 @@
:title: Index API
:description: API Documentation for Docker Index
:keywords: API, Docker, index, REST, documentation
=================
Docker Index API
=================
1. Brief introduction
=====================
- This is the REST API for the Docker index
- Authorization is done with basic auth over SSL
- Not all commands require authentication, only those noted as such.
2. Endpoints
============
2.1 Repository
^^^^^^^^^^^^^^
Repositories
*************
User Repo
~~~~~~~~~
.. http:put:: /v1/repositories/(namespace)/(repo_name)/
Create a user repository with the given ``namespace`` and ``repo_name``.
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foo/bar/ HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
X-Docker-Token: true
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
:parameter namespace: the namespace for the repo
:parameter repo_name: the name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=write
X-Docker-Token: signature=123abc,repository="foo/bar",access=write
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
""
:statuscode 200: Created
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active
.. http:delete:: /v1/repositories/(namespace)/(repo_name)/
Delete a user repository with the given ``namespace`` and ``repo_name``.
**Example Request**:
.. sourcecode:: http
DELETE /v1/repositories/foo/bar/ HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
X-Docker-Token: true
""
:parameter namespace: the namespace for the repo
:parameter repo_name: the name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 202
Vary: Accept
Content-Type: application/json
WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=delete
X-Docker-Token: signature=123abc,repository="foo/bar",access=delete
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
""
:statuscode 200: Deleted
:statuscode 202: Accepted
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active
Library Repo
~~~~~~~~~~~~
.. http:put:: /v1/repositories/(repo_name)/
Create a library repository with the given ``repo_name``.
This is a restricted feature only available to docker admins.
When namespace is missing, it is assumed to be ``library``
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foobar/ HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
X-Docker-Token: true
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
:parameter repo_name: the library name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=write
X-Docker-Token: signature=123abc,repository="foo/bar",access=write
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
""
:statuscode 200: Created
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active
.. http:delete:: /v1/repositories/(repo_name)/
Delete a library repository with the given ``repo_name``.
This is a restricted feature only available to docker admins.
When namespace is missing, it is assumed to be ``library``
**Example Request**:
.. sourcecode:: http
DELETE /v1/repositories/foobar/ HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
X-Docker-Token: true
""
:parameter repo_name: the library name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 202
Vary: Accept
Content-Type: application/json
WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=delete
X-Docker-Token: signature=123abc,repository="foo/bar",access=delete
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
""
:statuscode 200: Deleted
:statuscode 202: Accepted
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active
Repository Images
*****************
User Repo Images
~~~~~~~~~~~~~~~~
.. http:put:: /v1/repositories/(namespace)/(repo_name)/images
Update the images for a user repo.
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foo/bar/images HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
:parameter namespace: the namespace for the repo
:parameter repo_name: the name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 204
Vary: Accept
Content-Type: application/json
""
:statuscode 204: Created
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active or permission denied
.. http:get:: /v1/repositories/(namespace)/(repo_name)/images
get the images for a user repo.
**Example Request**:
.. sourcecode:: http
GET /v1/repositories/foo/bar/images HTTP/1.1
Host: index.docker.io
Accept: application/json
:parameter namespace: the namespace for the repo
:parameter repo_name: the name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
{"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
"checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
:statuscode 200: OK
:statuscode 404: Not found
Library Repo Images
~~~~~~~~~~~~~~~~~~~
.. http:put:: /v1/repositories/(repo_name)/images
Update the images for a library repo.
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foobar/images HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
:parameter repo_name: the library name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 204
Vary: Accept
Content-Type: application/json
""
:statuscode 204: Created
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active or permission denied
.. http:get:: /v1/repositories/(repo_name)/images
get the images for a library repo.
**Example Request**:
.. sourcecode:: http
GET /v1/repositories/foobar/images HTTP/1.1
Host: index.docker.io
Accept: application/json
:parameter repo_name: the library name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
{"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
"checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
:statuscode 200: OK
:statuscode 404: Not found
Repository Authorization
************************
Library Repo
~~~~~~~~~~~~
.. http:put:: /v1/repositories/(repo_name)/auth
authorize a token for a library repo
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foobar/auth HTTP/1.1
Host: index.docker.io
Accept: application/json
Authorization: Token signature=123abc,repository="library/foobar",access=write
:parameter repo_name: the library name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
"OK"
:statuscode 200: OK
:statuscode 403: Permission denied
:statuscode 404: Not found
User Repo
~~~~~~~~~
.. http:put:: /v1/repositories/(namespace)/(repo_name)/auth
authorize a token for a user repo
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foo/bar/auth HTTP/1.1
Host: index.docker.io
Accept: application/json
Authorization: Token signature=123abc,repository="foo/bar",access=write
:parameter namespace: the namespace for the repo
:parameter repo_name: the name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
"OK"
:statuscode 200: OK
:statuscode 403: Permission denied
:statuscode 404: Not found
2.2 Users
^^^^^^^^^
User Login
**********
.. http:get:: /v1/users
If you want to check your login, you can try this endpoint
**Example Request**:
.. sourcecode:: http
GET /v1/users HTTP/1.1
Host: index.docker.io
Accept: application/json
Authorization: Basic akmklmasadalkm==
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
OK
:statuscode 200: no error
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active
User Register
*************
.. http:post:: /v1/users
Registering a new account.
**Example request**:
.. sourcecode:: http
POST /v1/users HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
{"email": "sam@dotcloud.com",
"password": "toto42",
"username": "foobar"'}
:jsonparameter email: valid email address, that needs to be confirmed
:jsonparameter username: min 4 character, max 30 characters, must match the regular expression [a-z0-9\_].
:jsonparameter password: min 5 characters
**Example Response**:
.. sourcecode:: http
HTTP/1.1 201 OK
Vary: Accept
Content-Type: application/json
"User Created"
:statuscode 201: User Created
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
Update User
***********
.. http:put:: /v1/users/(username)/
Change a password or email address for given user. If you pass in an email,
it will add it to your account, it will not remove the old one. Passwords will
be updated.
It is up to the client to verify that that password that is sent is the one that
they want. Common approach is to have them type it twice.
**Example Request**:
.. sourcecode:: http
PUT /v1/users/fakeuser/ HTTP/1.1
Host: index.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Basic akmklmasadalkm==
{"email": "sam@dotcloud.com",
"password": "toto42"}
:parameter username: username for the person you want to update
**Example Response**:
.. sourcecode:: http
HTTP/1.1 204
Vary: Accept
Content-Type: application/json
""
:statuscode 204: User Updated
:statuscode 400: Errors (invalid json, missing or invalid fields, etc)
:statuscode 401: Unauthorized
:statuscode 403: Account is not Active
:statuscode 404: User not found
2.3 Search
^^^^^^^^^^
If you need to search the index, this is the endpoint you would use.
Search
******
.. http:get:: /v1/search
Search the Index given a search term. It accepts :http:method:`get` only.
**Example request**:
.. sourcecode:: http
GET /v1/search?q=search_term HTTP/1.1
Host: example.com
Accept: application/json
**Example response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{"query":"search_term",
"num_results": 3,
"results" : [
{"name": "ubuntu", "description": "An ubuntu image..."},
{"name": "centos", "description": "A centos image..."},
{"name": "fedora", "description": "A fedora image..."}
]
}
:query q: what you want to search for
:statuscode 200: no error
:statuscode 500: server error
+500
View File
@@ -0,0 +1,500 @@
:title: Registry API
:description: API Documentation for Docker Registry
:keywords: API, Docker, index, registry, REST, documentation
===================
Docker Registry API
===================
1. Brief introduction
=====================
- This is the REST API for the Docker Registry
- It stores the images and the graph for a set of repositories
- It does not have user accounts data
- It has no notion of user accounts or authorization
- It delegates authentication and authorization to the Index Auth service using tokens
- It supports different storage backends (S3, cloud files, local FS)
- It doesnt have a local database
- It will be open-sourced at some point
We expect that there will be multiple registries out there. To help to grasp the context, here are some examples of registries:
- **sponsor registry**: such a registry is provided by a third-party hosting infrastructure as a convenience for their customers and the docker community as a whole. Its costs are supported by the third party, but the management and operation of the registry are supported by dotCloud. It features read/write access, and delegates authentication and authorization to the Index.
- **mirror registry**: such a registry is provided by a third-party hosting infrastructure but is targeted at their customers only. Some mechanism (unspecified to date) ensures that public images are pulled from a sponsor registry to the mirror registry, to make sure that the customers of the third-party provider can “docker pull” those images locally.
- **vendor registry**: such a registry is provided by a software vendor, who wants to distribute docker images. It would be operated and managed by the vendor. Only users authorized by the vendor would be able to get write access. Some images would be public (accessible for anyone), others private (accessible only for authorized users). Authentication and authorization would be delegated to the Index. The goal of vendor registries is to let someone do “docker pull basho/riak1.3” and automatically push from the vendor registry (instead of a sponsor registry); i.e. get all the convenience of a sponsor registry, while retaining control on the asset distribution.
- **private registry**: such a registry is located behind a firewall, or protected by an additional security layer (HTTP authorization, SSL client-side certificates, IP address authorization...). The registry is operated by a private entity, outside of dotClouds control. It can optionally delegate additional authorization to the Index, but it is not mandatory.
.. note::
Mirror registries and private registries which do not use the Index dont even need to run the registry code. They can be implemented by any kind of transport implementing HTTP GET and PUT. Read-only registries can be powered by a simple static HTTP server.
.. note::
The latter implies that while HTTP is the protocol of choice for a registry, multiple schemes are possible (and in some cases, trivial):
- HTTP with GET (and PUT for read-write registries);
- local mount point;
- remote docker addressed through SSH.
The latter would only require two new commands in docker, e.g. “registryget” and “registryput”, wrapping access to the local filesystem (and optionally doing consistency checks). Authentication and authorization are then delegated to SSH (e.g. with public keys).
2. Endpoints
============
2.1 Images
----------
Layer
*****
.. http:get:: /v1/images/(image_id)/layer
get image layer for a given ``image_id``
**Example Request**:
.. sourcecode:: http
GET /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Authorization: Token signature=123abc,repository="foo/bar",access=read
:parameter image_id: the id for the layer you want to get
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
X-Docker-Registry-Version: 0.6.0
Cookie: (Cookie provided by the Registry)
{layer binary data stream}
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Image not found
.. http:put:: /v1/images/(image_id)/layer
put image layer for a given ``image_id``
**Example Request**:
.. sourcecode:: http
PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
Host: registry-1.docker.io
Transfer-Encoding: chunked
Authorization: Token signature=123abc,repository="foo/bar",access=write
{layer binary data stream}
:parameter image_id: the id for the layer you want to get
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
""
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Image not found
Image
*****
.. http:put:: /v1/images/(image_id)/json
put image for a given ``image_id``
**Example Request**:
.. sourcecode:: http
PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/json HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)
{
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
created: "2013-04-30T17:46:10.843673+03:00",
container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
container_config: {
Hostname: "host-test",
User: "",
Memory: 0,
MemorySwap: 0,
AttachStdin: false,
AttachStdout: false,
AttachStderr: false,
PortSpecs: null,
Tty: false,
OpenStdin: false,
StdinOnce: false,
Env: null,
Cmd: [
"/bin/bash",
"-c",
"apt-get -q -yy -f install libevent-dev"
],
Dns: null,
Image: "imagename/blah",
Volumes: { },
VolumesFrom: ""
},
docker_version: "0.1.7"
}
:parameter image_id: the id for the layer you want to get
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
""
:statuscode 200: OK
:statuscode 401: Requires authorization
.. http:get:: /v1/images/(image_id)/json
get image for a given ``image_id``
**Example Request**:
.. sourcecode:: http
GET /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/json HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)
:parameter image_id: the id for the layer you want to get
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
X-Docker-Size: 456789
X-Docker-Checksum: b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087
{
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
created: "2013-04-30T17:46:10.843673+03:00",
container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
container_config: {
Hostname: "host-test",
User: "",
Memory: 0,
MemorySwap: 0,
AttachStdin: false,
AttachStdout: false,
AttachStderr: false,
PortSpecs: null,
Tty: false,
OpenStdin: false,
StdinOnce: false,
Env: null,
Cmd: [
"/bin/bash",
"-c",
"apt-get -q -yy -f install libevent-dev"
],
Dns: null,
Image: "imagename/blah",
Volumes: { },
VolumesFrom: ""
},
docker_version: "0.1.7"
}
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Image not found
Ancestry
********
.. http:get:: /v1/images/(image_id)/ancestry
get ancestry for an image given an ``image_id``
**Example Request**:
.. sourcecode:: http
GET /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/ancestry HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)
:parameter image_id: the id for the layer you want to get
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
["088b4502f51920fbd9b7c503e87c7a2c05aa3adc3d35e79c031fa126b403200f",
"aeee63968d87c7da4a5cf5d2be6bee4e21bc226fd62273d180a49c96c62e4543",
"bfa4c5326bc764280b0863b46a4b20d940bc1897ef9c1dfec060604bdc383280",
"6ab5893c6927c15a15665191f2c6cf751f5056d8b95ceee32e43c5e8a3648544"]
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Image not found
2.2 Tags
--------
.. http:get:: /v1/repositories/(namespace)/(repository)/tags
get all of the tags for the given repo.
**Example Request**:
.. sourcecode:: http
GET /v1/repositories/foo/bar/tags HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
Cookie: (Cookie provided by the Registry)
:parameter namespace: namespace for the repo
:parameter repository: name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
{
"latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
"0.1.1": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"
}
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Repository not found
.. http:get:: /v1/repositories/(namespace)/(repository)/tags/(tag)
get a tag for the given repo.
**Example Request**:
.. sourcecode:: http
GET /v1/repositories/foo/bar/tags/latest HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
Cookie: (Cookie provided by the Registry)
:parameter namespace: namespace for the repo
:parameter repository: name for the repo
:parameter tag: name of tag you want to get
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Tag not found
.. http:delete:: /v1/repositories/(namespace)/(repository)/tags/(tag)
delete the tag for the repo
**Example Request**:
.. sourcecode:: http
DELETE /v1/repositories/foo/bar/tags/latest HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)
:parameter namespace: namespace for the repo
:parameter repository: name for the repo
:parameter tag: name of tag you want to delete
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
""
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Tag not found
.. http:put:: /v1/repositories/(namespace)/(repository)/tags/(tag)
put a tag for the given repo.
**Example Request**:
.. sourcecode:: http
PUT /v1/repositories/foo/bar/tags/latest HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
:parameter namespace: namespace for the repo
:parameter repository: name for the repo
:parameter tag: name of tag you want to add
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
""
:statuscode 200: OK
:statuscode 400: Invalid data
:statuscode 401: Requires authorization
:statuscode 404: Image not found
2.3 Repositories
----------------
.. http:delete:: /v1/repositories/(namespace)/(repository)/
delete a repository
**Example Request**:
.. sourcecode:: http
DELETE /v1/repositories/foo/bar/ HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)
""
:parameter namespace: namespace for the repo
:parameter repository: name for the repo
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
""
:statuscode 200: OK
:statuscode 401: Requires authorization
:statuscode 404: Repository not found
2.4 Status
----------
.. http:get:: /v1/_ping
Check status of the registry. This endpoint is also used to determine if
the registry supports SSL.
**Example Request**:
.. sourcecode:: http
GET /v1/_ping HTTP/1.1
Host: registry-1.docker.io
Accept: application/json
Content-Type: application/json
""
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200
Vary: Accept
Content-Type: application/json
X-Docker-Registry-Version: 0.6.0
""
:statuscode 200: OK
3 Authorization
===============
This is where we describe the authorization process, including the tokens and cookies.
TODO: add more info.
+569
View File
@@ -0,0 +1,569 @@
:title: Registry Documentation
:description: Documentation for docker Registry and Registry API
:keywords: docker, registry, api, index
.. _registryindexspec:
=====================
Registry & Index Spec
=====================
1. The 3 roles
===============
1.1 Index
---------
The Index is responsible for centralizing information about:
- User accounts
- Checksums of the images
- Public namespaces
The Index has different components:
- Web UI
- Meta-data store (comments, stars, list public repositories)
- Authentication service
- Tokenization
The index is authoritative for those information.
We expect that there will be only one instance of the index, run and managed by dotCloud.
1.2 Registry
------------
- It stores the images and the graph for a set of repositories
- It does not have user accounts data
- It has no notion of user accounts or authorization
- It delegates authentication and authorization to the Index Auth service using tokens
- It supports different storage backends (S3, cloud files, local FS)
- It doesnt have a local database
- It will be open-sourced at some point
We expect that there will be multiple registries out there. To help to grasp the context, here are some examples of registries:
- **sponsor registry**: such a registry is provided by a third-party hosting infrastructure as a convenience for their customers and the docker community as a whole. Its costs are supported by the third party, but the management and operation of the registry are supported by dotCloud. It features read/write access, and delegates authentication and authorization to the Index.
- **mirror registry**: such a registry is provided by a third-party hosting infrastructure but is targeted at their customers only. Some mechanism (unspecified to date) ensures that public images are pulled from a sponsor registry to the mirror registry, to make sure that the customers of the third-party provider can “docker pull” those images locally.
- **vendor registry**: such a registry is provided by a software vendor, who wants to distribute docker images. It would be operated and managed by the vendor. Only users authorized by the vendor would be able to get write access. Some images would be public (accessible for anyone), others private (accessible only for authorized users). Authentication and authorization would be delegated to the Index. The goal of vendor registries is to let someone do “docker pull basho/riak1.3” and automatically push from the vendor registry (instead of a sponsor registry); i.e. get all the convenience of a sponsor registry, while retaining control on the asset distribution.
- **private registry**: such a registry is located behind a firewall, or protected by an additional security layer (HTTP authorization, SSL client-side certificates, IP address authorization...). The registry is operated by a private entity, outside of dotClouds control. It can optionally delegate additional authorization to the Index, but it is not mandatory.
.. note::
Mirror registries and private registries which do not use the Index dont even need to run the registry code. They can be implemented by any kind of transport implementing HTTP GET and PUT. Read-only registries can be powered by a simple static HTTP server.
.. note::
The latter implies that while HTTP is the protocol of choice for a registry, multiple schemes are possible (and in some cases, trivial):
- HTTP with GET (and PUT for read-write registries);
- local mount point;
- remote docker addressed through SSH.
The latter would only require two new commands in docker, e.g. “registryget” and “registryput”, wrapping access to the local filesystem (and optionally doing consistency checks). Authentication and authorization are then delegated to SSH (e.g. with public keys).
1.3 Docker
----------
On top of being a runtime for LXC, Docker is the Registry client. It supports:
- Push / Pull on the registry
- Client authentication on the Index
2. Workflow
===========
2.1 Pull
--------
.. image:: /static_files/docker_pull_chart.png
1. Contact the Index to know where I should download “samalba/busybox”
2. Index replies:
a. “samalba/busybox” is on Registry A
b. here are the checksums for “samalba/busybox” (for all layers)
c. token
3. Contact Registry A to receive the layers for “samalba/busybox” (all of them to the base image). Registry A is authoritative for “samalba/busybox” but keeps a copy of all inherited layers and serve them all from the same location.
4. registry contacts index to verify if token/user is allowed to download images
5. Index returns true/false lettings registry know if it should proceed or error out
6. Get the payload for all layers
Its possible to run docker pull \https://<registry>/repositories/samalba/busybox. In this case, docker bypasses the Index. However the security is not guaranteed (in case Registry A is corrupted) because there wont be any checksum checks.
Currently registry redirects to s3 urls for downloads, going forward all downloads need to be streamed through the registry. The Registry will then abstract the calls to S3 by a top-level class which implements sub-classes for S3 and local storage.
Token is only returned when the 'X-Docker-Token' header is sent with request.
Basic Auth is required to pull private repos. Basic auth isn't required for pulling public repos, but if one is provided, it needs to be valid and for an active account.
API (pulling repository foo/bar):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. (Docker -> Index) GET /v1/repositories/foo/bar/images
**Headers**:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
X-Docker-Token: true
**Action**:
(looking up the foo/bar in db and gets images and checksums for that repo (all if no tag is specified, if tag, only checksums for those tags) see part 4.4.1)
2. (Index -> Docker) HTTP 200 OK
**Headers**:
- Authorization: Token signature=123abc,repository=”foo/bar”,access=write
- X-Docker-Endpoints: registry.docker.io [, registry2.docker.io]
**Body**:
Jsonified checksums (see part 4.4.1)
3. (Docker -> Registry) GET /v1/repositories/foo/bar/tags/latest
**Headers**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=write
4. (Registry -> Index) GET /v1/repositories/foo/bar/images
**Headers**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=read
**Body**:
<ids and checksums in payload>
**Action**:
( Lookup token see if they have access to pull.)
If good:
HTTP 200 OK
Index will invalidate the token
If bad:
HTTP 401 Unauthorized
5. (Docker -> Registry) GET /v1/images/928374982374/ancestry
**Action**:
(for each image id returned in the registry, fetch /json + /layer)
.. note::
If someone makes a second request, then we will always give a new token, never reuse tokens.
2.2 Push
--------
.. image:: /static_files/docker_push_chart.png
1. Contact the index to allocate the repository name “samalba/busybox” (authentication required with user credentials)
2. If authentication works and namespace available, “samalba/busybox” is allocated and a temporary token is returned (namespace is marked as initialized in index)
3. Push the image on the registry (along with the token)
4. Registry A contacts the Index to verify the token (token must corresponds to the repository name)
5. Index validates the token. Registry A starts reading the stream pushed by docker and store the repository (with its images)
6. docker contacts the index to give checksums for upload images
.. note::
**Its possible not to use the Index at all!** In this case, a deployed version of the Registry is deployed to store and serve images. Those images are not authenticated and the security is not guaranteed.
.. note::
**Index can be replaced!** For a private Registry deployed, a custom Index can be used to serve and validate token according to different policies.
Docker computes the checksums and submit them to the Index at the end of the push. When a repository name does not have checksums on the Index, it means that the push is in progress (since checksums are submitted at the end).
API (pushing repos foo/bar):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. (Docker -> Index) PUT /v1/repositories/foo/bar/
**Headers**:
Authorization: Basic sdkjfskdjfhsdkjfh==
X-Docker-Token: true
**Action**::
- in index, we allocated a new repository, and set to initialized
**Body**::
(The body contains the list of images that are going to be pushed, with empty checksums. The checksums will be set at the end of the push)::
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
2. (Index -> Docker) 200 Created
**Headers**:
- WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=write
- X-Docker-Endpoints: registry.docker.io [, registry2.docker.io]
3. (Docker -> Registry) PUT /v1/images/98765432_parent/json
**Headers**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=write
4. (Registry->Index) GET /v1/repositories/foo/bar/images
**Headers**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=write
**Action**::
- Index:
will invalidate the token.
- Registry:
grants a session (if token is approved) and fetches the images id
5. (Docker -> Registry) PUT /v1/images/98765432_parent/json
**Headers**::
- Authorization: Token signature=123abc,repository=”foo/bar”,access=write
- Cookie: (Cookie provided by the Registry)
6. (Docker -> Registry) PUT /v1/images/98765432/json
**Headers**:
Cookie: (Cookie provided by the Registry)
7. (Docker -> Registry) PUT /v1/images/98765432_parent/layer
**Headers**:
Cookie: (Cookie provided by the Registry)
8. (Docker -> Registry) PUT /v1/images/98765432/layer
**Headers**:
X-Docker-Checksum: sha256:436745873465fdjkhdfjkgh
9. (Docker -> Registry) PUT /v1/repositories/foo/bar/tags/latest
**Headers**:
Cookie: (Cookie provided by the Registry)
**Body**:
“98765432”
10. (Docker -> Index) PUT /v1/repositories/foo/bar/images
**Headers**:
Authorization: Basic 123oislifjsldfj==
X-Docker-Endpoints: registry1.docker.io (no validation on this right now)
**Body**:
(The image, ids, tags and checksums)
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
**Return** HTTP 204
.. note::
If push fails and they need to start again, what happens in the index, there will already be a record for the namespace/name, but it will be initialized. Should we allow it, or mark as name already used? One edge case could be if someone pushes the same thing at the same time with two different shells.
If it's a retry on the Registry, Docker has a cookie (provided by the registry after token validation). So the Index wont have to provide a new token.
2.3 Delete
----------
If you need to delete something from the index or registry, we need a nice clean way to do that. Here is the workflow.
1. Docker contacts the index to request a delete of a repository “samalba/busybox” (authentication required with user credentials)
2. If authentication works and repository is valid, “samalba/busybox” is marked as deleted and a temporary token is returned
3. Send a delete request to the registry for the repository (along with the token)
4. Registry A contacts the Index to verify the token (token must corresponds to the repository name)
5. Index validates the token. Registry A deletes the repository and everything associated to it.
6. docker contacts the index to let it know it was removed from the registry, the index removes all records from the database.
.. note::
The Docker client should present an "Are you sure?" prompt to confirm the deletion before starting the process. Once it starts it can't be undone.
API (deleting repository foo/bar):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. (Docker -> Index) DELETE /v1/repositories/foo/bar/
**Headers**:
Authorization: Basic sdkjfskdjfhsdkjfh==
X-Docker-Token: true
**Action**::
- in index, we make sure it is a valid repository, and set to deleted (logically)
**Body**::
Empty
2. (Index -> Docker) 202 Accepted
**Headers**:
- WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=delete
- X-Docker-Endpoints: registry.docker.io [, registry2.docker.io] # list of endpoints where this repo lives.
3. (Docker -> Registry) DELETE /v1/repositories/foo/bar/
**Headers**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=delete
4. (Registry->Index) PUT /v1/repositories/foo/bar/auth
**Headers**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=delete
**Action**::
- Index:
will invalidate the token.
- Registry:
deletes the repository (if token is approved)
5. (Registry -> Docker) 200 OK
200 If success
403 if forbidden
400 if bad request
404 if repository isn't found
6. (Docker -> Index) DELETE /v1/repositories/foo/bar/
**Headers**:
Authorization: Basic 123oislifjsldfj==
X-Docker-Endpoints: registry-1.docker.io (no validation on this right now)
**Body**:
Empty
**Return** HTTP 200
3. How to use the Registry in standalone mode
=============================================
The Index has two main purposes (along with its fancy social features):
- Resolve short names (to avoid passing absolute URLs all the time)
- username/projectname -> \https://registry.docker.io/users/<username>/repositories/<projectname>/
- team/projectname -> \https://registry.docker.io/team/<team>/repositories/<projectname>/
- Authenticate a user as a repos owner (for a central referenced repository)
3.1 Without an Index
--------------------
Using the Registry without the Index can be useful to store the images on a private network without having to rely on an external entity controlled by dotCloud.
In this case, the registry will be launched in a special mode (--standalone? --no-index?). In this mode, the only thing which changes is that Registry will never contact the Index to verify a token. It will be the Registry owner responsibility to authenticate the user who pushes (or even pulls) an image using any mechanism (HTTP auth, IP based, etc...).
In this scenario, the Registry is responsible for the security in case of data corruption since the checksums are not delivered by a trusted entity.
As hinted previously, a standalone registry can also be implemented by any HTTP server handling GET/PUT requests (or even only GET requests if no write access is necessary).
3.2 With an Index
-----------------
The Index data needed by the Registry are simple:
- Serve the checksums
- Provide and authorize a Token
In the scenario of a Registry running on a private network with the need of centralizing and authorizing, its easy to use a custom Index.
The only challenge will be to tell Docker to contact (and trust) this custom Index. Docker will be configurable at some point to use a specific Index, itll be the private entity responsibility (basically the organization who uses Docker in a private environment) to maintain the Index and the Dockers configuration among its consumers.
4. The API
==========
The first version of the api is available here: https://github.com/jpetazzo/docker/blob/acd51ecea8f5d3c02b00a08176171c59442df8b3/docs/images-repositories-push-pull.md
4.1 Images
----------
The format returned in the images is not defined here (for layer and json), basically because Registry stores exactly the same kind of information as Docker uses to manage them.
The format of ancestry is a line-separated list of image ids, in age order. I.e. the images parent is on the last line, the parent of the parent on the next-to-last line, etc.; if the image has no parent, the file is empty.
GET /v1/images/<image_id>/layer
PUT /v1/images/<image_id>/layer
GET /v1/images/<image_id>/json
PUT /v1/images/<image_id>/json
GET /v1/images/<image_id>/ancestry
PUT /v1/images/<image_id>/ancestry
4.2 Users
---------
4.2.1 Create a user (Index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
POST /v1/users
**Body**:
{"email": "sam@dotcloud.com", "password": "toto42", "username": "foobar"'}
**Validation**:
- **username**: min 4 character, max 30 characters, must match the regular
expression [a-z0-9\_].
- **password**: min 5 characters
**Valid**: return HTTP 200
Errors: HTTP 400 (we should create error codes for possible errors)
- invalid json
- missing field
- wrong format (username, password, email, etc)
- forbidden name
- name already exists
.. note::
A user account will be valid only if the email has been validated (a validation link is sent to the email address).
4.2.2 Update a user (Index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
PUT /v1/users/<username>
**Body**:
{"password": "toto"}
.. note::
We can also update email address, if they do, they will need to reverify their new email address.
4.2.3 Login (Index)
^^^^^^^^^^^^^^^^^^^
Does nothing else but asking for a user authentication. Can be used to validate credentials. HTTP Basic Auth for now, maybe change in future.
GET /v1/users
**Return**:
- Valid: HTTP 200
- Invalid login: HTTP 401
- Account inactive: HTTP 403 Account is not Active
4.3 Tags (Registry)
-------------------
The Registry does not know anything about users. Even though repositories are under usernames, its just a namespace for the registry. Allowing us to implement organizations or different namespaces per user later, without modifying the Registrys API.
The following naming restrictions apply:
- Namespaces must match the same regular expression as usernames (See 4.2.1.)
- Repository names must match the regular expression [a-zA-Z0-9-_.]
4.3.1 Get all tags
^^^^^^^^^^^^^^^^^^
GET /v1/repositories/<namespace>/<repository_name>/tags
**Return**: HTTP 200
{
"latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
“0.1.1”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
}
4.3.2 Read the content of a tag (resolve the image id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GET /v1/repositories/<namespace>/<repo_name>/tags/<tag>
**Return**:
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
4.3.3 Delete a tag (registry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DELETE /v1/repositories/<namespace>/<repo_name>/tags/<tag>
4.4 Images (Index)
------------------
For the Index to “resolve” the repository name to a Registry location, it uses the X-Docker-Endpoints header. In other terms, this requests always add a “X-Docker-Endpoints” to indicate the location of the registry which hosts this repository.
4.4.1 Get the images
^^^^^^^^^^^^^^^^^^^^^
GET /v1/repositories/<namespace>/<repo_name>/images
**Return**: HTTP 200
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”, “checksum”: “md5:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
4.4.2 Add/update the images
^^^^^^^^^^^^^^^^^^^^^^^^^^^
You always add images, you never remove them.
PUT /v1/repositories/<namespace>/<repo_name>/images
**Body**:
[ {“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”, “checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”} ]
**Return** 204
4.5 Repositories
----------------
4.5.1 Remove a Repository (Registry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DELETE /v1/repositories/<namespace>/<repo_name>
Return 200 OK
4.5.2 Remove a Repository (Index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This starts the delete process. see 2.3 for more details.
DELETE /v1/repositories/<namespace>/<repo_name>
Return 202 OK
5. Chaining Registries
======================
Its possible to chain Registries server for several reasons:
- Load balancing
- Delegate the next request to another server
When a Registry is a reference for a repository, it should host the entire images chain in order to avoid breaking the chain during the download.
The Index and Registry use this mechanism to redirect on one or the other.
Example with an image download:
On every request, a special header can be returned:
X-Docker-Endpoints: server1,server2
On the next request, the client will always pick a server from this list.
6. Authentication & Authorization
=================================
6.1 On the Index
-----------------
The Index supports both “Basic” and “Token” challenges. Usually when there is a “401 Unauthorized”, the Index replies this::
401 Unauthorized
WWW-Authenticate: Basic realm="auth required",Token
You have 3 options:
1. Provide user credentials and ask for a token
**Header**:
- Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- X-Docker-Token: true
In this case, along with the 200 response, youll get a new token (if user auth is ok):
If authorization isn't correct you get a 401 response.
If account isn't active you will get a 403 response.
**Response**:
- 200 OK
- X-Docker-Token: Token signature=123abc,repository=”foo/bar”,access=read
2. Provide user credentials only
**Header**:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
3. Provide Token
**Header**:
Authorization: Token signature=123abc,repository=”foo/bar”,access=read
6.2 On the Registry
-------------------
The Registry only supports the Token challenge::
401 Unauthorized
WWW-Authenticate: Token
The only way is to provide a token on “401 Unauthorized” responses::
Authorization: Token signature=123abc,repository=”foo/bar”,access=read
Usually, the Registry provides a Cookie when a Token verification succeeded. Every time the Registry passes a Cookie, you have to pass it back the same cookie.::
200 OK
Set-Cookie: session="wD/J7LqL5ctqw8haL10vgfhrb2Q=?foo=UydiYXInCnAxCi4=&timestamp=RjEzNjYzMTQ5NDcuNDc0NjQzCi4="; Path=/; HttpOnly
Next request::
GET /(...)
Cookie: session="wD/J7LqL5ctqw8haL10vgfhrb2Q=?foo=UydiYXInCnAxCi4=&timestamp=RjEzNjYzMTQ5NDcuNDc0NjQzCi4="
7 Document Version
====================
- 1.0 : May 6th 2013 : initial release
- 1.1 : June 1st 2013 : Added Delete Repository and way to handle new source namespace.
@@ -0,0 +1,37 @@
:title: Registry API
:description: Various client libraries available to use with the Docker remote API
:keywords: API, Docker, index, registry, REST, documentation, clients, Python, Ruby, Javascript, Erlang, Go
==================================
Docker Remote API Client Libraries
==================================
These libraries have not been tested by the Docker Maintainers for
compatibility. Please file issues with the library owners. If you
find more library implementations, please list them in Docker doc bugs
and we will add the libraries here.
+----------------------+----------------+--------------------------------------------+
| Language/Framework | Name | Repository |
+======================+================+============================================+
| Python | docker-py | https://github.com/dotcloud/docker-py |
+----------------------+----------------+--------------------------------------------+
| Ruby | docker-client | https://github.com/geku/docker-client |
+----------------------+----------------+--------------------------------------------+
| Ruby | docker-api | https://github.com/swipely/docker-api |
+----------------------+----------------+--------------------------------------------+
| Javascript (NodeJS) | docker.io | https://github.com/appersonlabs/docker.io |
| | | Install via NPM: `npm install docker.io` |
+----------------------+----------------+--------------------------------------------+
| Javascript | docker-js | https://github.com/dgoujard/docker-js |
+----------------------+----------------+--------------------------------------------+
| Javascript (Angular) | dockerui | https://github.com/crosbymichael/dockerui |
| **WebUI** | | |
+----------------------+----------------+--------------------------------------------+
| Java | docker-java | https://github.com/kpelykh/docker-java |
+----------------------+----------------+--------------------------------------------+
| Erlang | erldocker | https://github.com/proger/erldocker |
+----------------------+----------------+--------------------------------------------+
| Go | go-dockerclient| https://github.com/fsouza/go-dockerclient |
+----------------------+----------------+--------------------------------------------+
+755
View File
@@ -0,0 +1,755 @@
:title: Command Line Interface
:description: Docker's CLI command description and usage
:keywords: Docker, Docker documentation, CLI, command line
.. _cli:
Command Line Help
-----------------
To list available commands, either run ``docker`` with no parameters or execute
``docker help``::
$ sudo docker
Usage: docker [OPTIONS] COMMAND [arg...]
-H=[unix:///var/run/docker.sock]: tcp://host:port to bind/connect to or unix://path/to/socket to use
A self-sufficient runtime for linux containers.
...
.. _cli_attach:
``attach``
----------
::
Usage: docker attach CONTAINER
Attach to a running container.
-nostdin=false: Do not attach stdin
-sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
You can detach from the container again (and leave it running) with
``CTRL-c`` (for a quiet exit) or ``CTRL-\`` to get a stacktrace of
the Docker client when it quits.
To stop a container, use ``docker stop``
To kill the container, use ``docker kill``
.. _cli_attach_examples:
Examples:
~~~~~~~~~
.. code-block:: bash
$ ID=$(sudo docker run -d ubuntu /usr/bin/top -b)
$ sudo docker attach $ID
top - 02:05:52 up 3:05, 0 users, load average: 0.01, 0.02, 0.05
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 373572k total, 355560k used, 18012k free, 27872k buffers
Swap: 786428k total, 0k used, 786428k free, 221740k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 17200 1116 912 R 0 0.3 0:00.03 top
top - 02:05:55 up 3:05, 0 users, load average: 0.01, 0.02, 0.05
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 373572k total, 355244k used, 18328k free, 27872k buffers
Swap: 786428k total, 0k used, 786428k free, 221776k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top
top - 02:05:58 up 3:06, 0 users, load average: 0.01, 0.02, 0.05
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.3%sy, 0.0%ni, 99.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 373572k total, 355780k used, 17792k free, 27880k buffers
Swap: 786428k total, 0k used, 786428k free, 221776k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top
^C$
$ sudo docker stop $ID
.. _cli_build:
``build``
---------
::
Usage: docker build [OPTIONS] PATH | URL | -
Build a new container image from the source code at PATH
-t="": Repository name (and optionally a tag) to be applied to the resulting image in case of success.
-q=false: Suppress verbose build output.
-no-cache: Do not use the cache when building the image.
-rm: Remove intermediate containers after a successful build
When a single Dockerfile is given as URL, then no context is set. When a git repository is set as URL, the repository is used as context
.. _cli_build_examples:
Examples:
~~~~~~~~~
.. code-block:: bash
sudo docker build .
This will read the ``Dockerfile`` from the current directory. It will
also send any other files and directories found in the current
directory to the ``docker`` daemon.
The contents of this directory would be used by ``ADD`` commands found
within the ``Dockerfile``. This will send a lot of data to the
``docker`` daemon if the current directory contains a lot of data. If
the absolute path is provided instead of ``.`` then only the files and
directories required by the ADD commands from the ``Dockerfile`` will be
added to the context and transferred to the ``docker`` daemon.
.. code-block:: bash
sudo docker build -t vieux/apache:2.0 .
This will build like the previous example, but it will then tag the
resulting image. The repository name will be ``vieux/apache`` and the
tag will be ``2.0``
.. code-block:: bash
sudo docker build - < Dockerfile
This will read a ``Dockerfile`` from *stdin* without context. Due to
the lack of a context, no contents of any local directory will be sent
to the ``docker`` daemon. ``ADD`` doesn't work when running in this
mode because the absence of the context provides no source files to
copy to the container.
.. code-block:: bash
sudo docker build github.com/creack/docker-firefox
This will clone the Github repository and use it as context. The
``Dockerfile`` at the root of the repository is used as
``Dockerfile``. Note that you can specify an arbitrary git repository
by using the ``git://`` schema.
.. _cli_commit:
``commit``
----------
::
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY [TAG]]
Create a new image from a container's changes
-m="": Commit message
-author="": Author (eg. "John Hannibal Smith <hannibal@a-team.com>"
-run="": Configuration to be applied when the image is launched with `docker run`.
(ex: '{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
Full -run example (multiline is ok within a single quote ``'``)
::
$ sudo docker commit -run='
{
"Entrypoint" : null,
"Privileged" : false,
"User" : "",
"VolumesFrom" : "",
"Cmd" : ["cat", "-e", "/etc/resolv.conf"],
"Dns" : ["8.8.8.8", "8.8.4.4"],
"MemorySwap" : 0,
"AttachStdin" : false,
"AttachStderr" : false,
"CpuShares" : 0,
"OpenStdin" : false,
"Volumes" : null,
"Hostname" : "122612f45831",
"PortSpecs" : ["22", "80", "443"],
"Image" : "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
"Tty" : false,
"Env" : [
"HOME=/",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"StdinOnce" : false,
"Domainname" : "",
"WorkingDir" : "/",
"NetworkDisabled" : false,
"Memory" : 0,
"AttachStdout" : false
}' $CONTAINER_ID
.. _cli_cp:
``cp``
------
::
Usage: docker cp CONTAINER:RESOURCE HOSTPATH
Copy files/folders from the containers filesystem to the host
path. Paths are relative to the root of the filesystem.
.. _cli_diff:
``diff``
--------
::
Usage: docker diff CONTAINER [OPTIONS]
Inspect changes on a container's filesystem
.. _cli_events:
``events``
----------
::
Usage: docker events
Get real time events from the server
.. _cli_events_example:
Examples
~~~~~~~~
You'll need two shells for this example.
Shell 1: Listening for events
.............................
.. code-block:: bash
$ sudo docker events
Shell 2: Start and Stop a Container
...................................
.. code-block:: bash
$ sudo docker start 4386fb97867d
$ sudo docker stop 4386fb97867d
Shell 1: (Again .. now showing events)
......................................
.. code-block:: bash
[2013-09-03 15:49:26 +0200 CEST] 4386fb97867d: (from 12de384bfb10) start
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
.. _cli_export:
``export``
----------
::
Usage: docker export CONTAINER
Export the contents of a filesystem as a tar archive
.. _cli_history:
``history``
-----------
::
Usage: docker history [OPTIONS] IMAGE
Show the history of an image
.. _cli_images:
``images``
----------
::
Usage: docker images [OPTIONS] [NAME]
List images
-a=false: show all images
-q=false: only show numeric IDs
-viz=false: output in graphviz format
Displaying images visually
~~~~~~~~~~~~~~~~~~~~~~~~~~
::
sudo docker images -viz | dot -Tpng -o docker.png
.. image:: docker_images.gif
:alt: Example inheritance graph of Docker images.
.. _cli_import:
``import``
----------
::
Usage: docker import URL|- [REPOSITORY [TAG]]
Create a new filesystem image from the contents of a tarball
At this time, the URL must start with ``http`` and point to a single
file archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) containing a
root filesystem. If you would like to import from a local directory or
archive, you can use the ``-`` parameter to take the data from
standard in.
Examples
~~~~~~~~
Import from a remote location
.............................
``$ sudo docker import http://example.com/exampleimage.tgz exampleimagerepo``
Import from a local file
........................
Import to docker via pipe and standard in
``$ cat exampleimage.tgz | sudo docker import - exampleimagelocal``
Import from a local directory
.............................
``$ sudo tar -c . | docker import - exampleimagedir``
Note the ``sudo`` in this example -- you must preserve the ownership
of the files (especially root ownership) during the archiving with
tar. If you are not root (or sudo) when you tar, then the ownerships
might not get preserved.
.. _cli_info:
``info``
--------
::
Usage: docker info
Display system-wide information.
.. _cli_insert:
``insert``
----------
::
Usage: docker insert IMAGE URL PATH
Insert a file from URL in the IMAGE at PATH
Examples
~~~~~~~~
Insert file from github
.......................
.. code-block:: bash
$ sudo docker insert 8283e18b24bc https://raw.github.com/metalivedev/django/master/postinstall /tmp/postinstall.sh
.. _cli_inspect:
``inspect``
-----------
::
Usage: docker inspect [OPTIONS] CONTAINER
Return low-level information on a container
.. _cli_kill:
``kill``
--------
::
Usage: docker kill CONTAINER [CONTAINER...]
Kill a running container
.. _cli_login:
``login``
---------
::
Usage: docker login [OPTIONS] [SERVER]
Register or Login to the docker registry server
-e="": email
-p="": password
-u="": username
If you want to login to a private registry you can
specify this by adding the server name.
example:
docker login localhost:8080
.. _cli_logs:
``logs``
--------
::
Usage: docker logs [OPTIONS] CONTAINER
Fetch the logs of a container
.. _cli_port:
``port``
--------
::
Usage: docker port [OPTIONS] CONTAINER PRIVATE_PORT
Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
.. _cli_ps:
``ps``
------
::
Usage: docker ps [OPTIONS]
List containers
-a=false: Show all containers. Only running containers are shown by default.
-notrunc=false: Don't truncate output
-q=false: Only display numeric IDs
.. _cli_pull:
``pull``
--------
::
Usage: docker pull NAME
Pull an image or a repository from the registry
.. _cli_push:
``push``
--------
::
Usage: docker push NAME
Push an image or a repository to the registry
.. _cli_restart:
``restart``
-----------
::
Usage: docker restart [OPTIONS] NAME
Restart a running container
.. _cli_rm:
``rm``
------
::
Usage: docker rm [OPTIONS] CONTAINER
Remove one or more containers
-link="": Remove the link instead of the actual container
Examples:
~~~~~~~~~
.. code-block:: bash
$ docker rm /redis
/redis
This will remove the container referenced under the link ``/redis``.
.. code-block:: bash
$ docker rm -link /webapp/redis
/webapp/redis
This will remove the underlying link between ``/webapp`` and the ``/redis`` containers removing all
network communication.
.. _cli_rmi:
``rmi``
-------
::
Usage: docker rmi IMAGE [IMAGE...]
Remove one or more images
.. _cli_run:
``run``
-------
::
Usage: docker run [OPTIONS] IMAGE[:TAG] [COMMAND] [ARG...]
Run a command in a new container
-a=map[]: Attach to stdin, stdout or stderr
-c=0: CPU shares (relative weight)
-cidfile="": Write the container ID to the file
-d=false: Detached mode: Run container in the background, print new container id
-e=[]: Set environment variables
-h="": Container host name
-i=false: Keep stdin open even if not attached
-privileged=false: Give extended privileges to this container
-m=0: Memory limit (in bytes)
-n=true: Enable networking for this container
-p=[]: Map a network port to the container
-rm=false: Automatically remove the container when it exits (incompatible with -d)
-t=false: Allocate a pseudo-tty
-u="": Username or UID
-dns=[]: Set custom dns servers for the container
-v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro]. If "container-dir" is missing, then docker creates a new volume.
-volumes-from="": Mount all volumes from the given container
-entrypoint="": Overwrite the default entrypoint set by the image
-w="": Working directory inside the container
-lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
-sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
-expose=[]: Expose a port from the container without publishing it to your host
-link="": Add link to another container (name:alias)
-name="": Assign the specified name to the container. If no name is specific docker will generate a random name
Examples
--------
.. code-block:: bash
sudo docker run -cidfile /tmp/docker_test.cid ubuntu echo "test"
This will create a container and print "test" to the console. The
``cidfile`` flag makes docker attempt to create a new file and write the
container ID to it. If the file exists already, docker will return an
error. Docker will close this file when docker run exits.
.. code-block:: bash
docker run mount -t tmpfs none /var/spool/squid
This will *not* work, because by default, most potentially dangerous
kernel capabilities are dropped; including ``cap_sys_admin`` (which is
required to mount filesystems). However, the ``-privileged`` flag will
allow it to run:
.. code-block:: bash
docker run -privileged mount -t tmpfs none /var/spool/squid
The ``-privileged`` flag gives *all* capabilities to the container,
and it also lifts all the limitations enforced by the ``device``
cgroup controller. In other words, the container can then do almost
everything that the host can do. This flag exists to allow special
use-cases, like running Docker within Docker.
.. code-block:: bash
docker run -w /path/to/dir/ -i -t ubuntu pwd
The ``-w`` lets the command being executed inside directory given,
here /path/to/dir/. If the path does not exists it is created inside the
container.
.. code-block:: bash
docker run -v `pwd`:`pwd` -w `pwd` -i -t ubuntu pwd
The ``-v`` flag mounts the current working directory into the container.
The ``-w`` lets the command being executed inside the current
working directory, by changing into the directory to the value
returned by ``pwd``. So this combination executes the command
using the container, but inside the current working directory.
.. code-block:: bash
docker run -p 127.0.0.0::80 ubuntu bash
This the ``-p`` flag now allows you to bind a port to a specific
interface of the host machine. In this example port ``80`` of the
container will have a dynamically allocated port bound to 127.0.0.1
of the host.
.. code-block:: bash
docker run -p 127.0.0.1:80:80 ubuntu bash
This will bind port ``80`` of the container to port ``80`` on 127.0.0.1 of your
host machine.
.. code-block:: bash
docker run -expose 80 ubuntu bash
This will expose port ``80`` of the container for use within a link
without publishing the port to the host system's interfaces.
.. code-block:: bash
docker run -name console -t -i ubuntu bash
This will create and run a new container with the container name
being ``console``.
.. code-block:: bash
docker run -link /redis:redis -name console ubuntu bash
The ``-link`` flag will link the container named ``/redis`` into the
newly created container with the alias ``redis``. The new container
can access the network and environment of the redis container via
environment variables. The ``-name`` flag will assign the name ``console``
to the newly created container.
.. _cli_search:
``search``
----------
::
Usage: docker search TERM
Searches for the TERM parameter on the Docker index and prints out
a list of repositories that match.
.. _cli_start:
``start``
---------
::
Usage: docker start [OPTIONS] NAME
Start a stopped container
-a=false: Attach container's stdout/stderr and forward all signals to the process
-i=false: Attach container's stdin
.. _cli_stop:
``stop``
--------
::
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
Stop a running container
-t=10: Number of seconds to wait for the container to stop before killing it.
.. _cli_tag:
``tag``
-------
::
Usage: docker tag [OPTIONS] IMAGE REPOSITORY [TAG]
Tag an image into a repository
-f=false: Force
.. _cli_top:
``top``
-------
::
Usage: docker top CONTAINER
Lookup the running processes of a container
.. _cli_version:
``version``
-----------
Show the version of the docker client, daemon, and latest released version.
.. _cli_wait:
``wait``
--------
::
Usage: docker wait [OPTIONS] NAME
Block until a container stops, then print its exit code.
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

+14
View File
@@ -0,0 +1,14 @@
:title: Commands
:description: docker command line interface
:keywords: commands, command line, help, docker
Commands
========
Contents:
.. toctree::
:maxdepth: 1
cli
+260
View File
@@ -0,0 +1,260 @@
# -*- coding: utf-8 -*-
#
# Docker documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 19 12:34:07 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# Additional templates that should be rendered to pages, maps page names to
# template names.
# the 'redirect_home.html' page redirects using a http meta refresh which, according
# to official sources is more or less equivalent of a 301.
html_additional_pages = {
'concepts/containers': 'redirect_home.html',
'concepts/introduction': 'redirect_home.html',
'builder/basics': 'redirect_build.html',
}
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinxcontrib.httpdomain']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
html_add_permalinks = u''
# The master toctree document.
master_doc = 'toctree'
# General information about the project.
project = u'Docker'
copyright = u'2013, Team Docker'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1'
# The full version, including alpha/beta/rc tags.
release = '0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'docker'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['../theme']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# We use a png favicon. This is not compatible with internet explorer, but looks
# much better on all other browsers. However, sphynx doesn't like it (it likes
# .ico better) so we have just put it in the template rather than used this setting
# html_favicon = 'favicon.png'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static_files']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'Dockerdoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('toctree', 'Docker.tex', u'Docker Documentation',
u'Team Docker', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('toctree', 'docker', u'Docker Documentation',
[u'Team Docker'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('toctree', 'Docker', u'Docker Documentation',
u'Team Docker', 'Docker', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
@@ -0,0 +1,22 @@
:title: Contribution Guidelines
:description: Contribution guidelines: create issues, conventions, pull requests
:keywords: contributing, docker, documentation, help, guideline
Contributing to Docker
======================
Want to hack on Docker? Awesome!
The repository includes `all the instructions you need to get
started <https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md>`_.
The developer environment `Dockerfile <https://github.com/dotcloud/docker/blob/master/Dockerfile>`_
specifies the tools and versions used to test and build Docker.
If you're making changes to the documentation, see the
`README.md <https://github.com/dotcloud/docker/blob/master/docs/README.md>`_.
The documentation environment `Dockerfile <https://github.com/dotcloud/docker/blob/master/docs/Dockerfile>`_
specifies the tools and versions used to build the Documentation.
Further interesting details can be found in the `Packaging hints <https://github.com/dotcloud/docker/blob/master/hack/PACKAGERS.md>`_.

Some files were not shown because too many files have changed in this diff Show More