Permalink
Browse files

Merge pull request #2428 from dotcloud/bump_0.6.5

Bump to version 0.6.5
  • Loading branch information...
crosbymichael committed Oct 29, 2013
2 parents f248a8e + da05414 commit 4f6ce1ba9e304462354d29483b95bdef3f647b52
Showing with 7,674 additions and 2,692 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 AUTHORS
  3. +29 −0 CHANGELOG.md
  4. +5 −7 Dockerfile
  5. +2 −3 NOTICE
  6. +6 −6 README.md
  7. +1 −1 VERSION
  8. +44 −9 api.go
  9. +9 −17 api_params.go
  10. +42 −27 api_test.go
  11. +4 −1 auth/auth_test.go
  12. +16 −6 buildfile.go
  13. +6 −24 buildfile_test.go
  14. +253 −113 commands.go
  15. +81 −16 commands_test.go
  16. +18 −0 config.go
  17. +275 −85 container.go
  18. +91 −40 container_test.go
  19. +0 −1 contrib/brew/.gitignore
  20. +0 −78 contrib/brew/README.md
  21. +0 −1 contrib/brew/brew/__init__.py
  22. +0 −185 contrib/brew/brew/brew.py
  23. +0 −63 contrib/brew/brew/git.py
  24. +0 −35 contrib/brew/docker-brew
  25. +0 −2 contrib/brew/requirements.txt
  26. +0 −22 contrib/brew/setup.py
  27. +27 −0 contrib/host-integration/Dockerfile.dev
  28. +4 −0 contrib/host-integration/Dockerfile.min
  29. +130 −0 contrib/host-integration/manager.go
  30. +53 −0 contrib/host-integration/manager.sh
  31. +20 −0 contrib/host-integration/manager/systemd
  32. +15 −0 contrib/host-integration/manager/upstart
  33. +13 −0 contrib/init/openrc/docker.confd
  34. +31 −0 contrib/init/openrc/docker.initd
  35. +13 −0 contrib/init/systemd/docker.service
  36. +85 −0 contrib/init/sysvinit/docker
  37. +10 −0 contrib/init/upstart/docker.conf
  38. +12 −10 contrib/mkimage-arch.sh
  39. +1 −1 contrib/mkimage-busybox.sh
  40. +0 −83 contrib/mkimage-debian.sh
  41. +233 −0 contrib/mkimage-debootstrap.sh
  42. +1 −1 contrib/mkimage-unittest.sh
  43. +2 −0 contrib/vim-syntax/syntax/dockerfile.vim
  44. +54 −26 docker/docker.go
  45. +16 −0 dockerinit/dockerinit.go
  46. +6 −1 docs/Dockerfile
  47. +5 −4 docs/README.md
  48. +21 −16 docs/sources/api/docker_remote_api_v1.0.rst
  49. +31 −26 docs/sources/api/docker_remote_api_v1.1.rst
  50. +22 −17 docs/sources/api/docker_remote_api_v1.2.rst
  51. +22 −17 docs/sources/api/docker_remote_api_v1.3.rst
  52. +10 −5 docs/sources/api/docker_remote_api_v1.4.rst
  53. +23 −18 docs/sources/api/docker_remote_api_v1.5.rst
  54. +16 −6 docs/sources/api/docker_remote_api_v1.6.rst
  55. +1 −1 docs/sources/api/index.rst
  56. +702 −38 docs/sources/commandline/cli.rst
  57. +0 −59 docs/sources/commandline/command/attach.rst
  58. +0 −65 docs/sources/commandline/command/build.rst
  59. +0 −52 docs/sources/commandline/command/commit.rst
  60. +0 −14 docs/sources/commandline/command/cp.rst
  61. +0 −13 docs/sources/commandline/command/diff.rst
  62. +0 −34 docs/sources/commandline/command/events.rst
  63. +0 −13 docs/sources/commandline/command/export.rst
  64. +0 −13 docs/sources/commandline/command/history.rst
  65. +0 −26 docs/sources/commandline/command/images.rst
  66. +0 −44 docs/sources/commandline/command/import.rst
  67. +0 −13 docs/sources/commandline/command/info.rst
  68. +0 −23 docs/sources/commandline/command/insert.rst
  69. +0 −13 docs/sources/commandline/command/inspect.rst
  70. +0 −13 docs/sources/commandline/command/kill.rst
  71. +0 −24 docs/sources/commandline/command/login.rst
  72. +0 −13 docs/sources/commandline/command/logs.rst
  73. +0 −13 docs/sources/commandline/command/port.rst
  74. +0 −17 docs/sources/commandline/command/ps.rst
  75. +0 −13 docs/sources/commandline/command/pull.rst
  76. +0 −13 docs/sources/commandline/command/push.rst
  77. +0 −13 docs/sources/commandline/command/restart.rst
  78. +0 −13 docs/sources/commandline/command/rm.rst
  79. +0 −13 docs/sources/commandline/command/rmi.rst
  80. +0 −85 docs/sources/commandline/command/run.rst
  81. +0 −14 docs/sources/commandline/command/search.rst
  82. +0 −13 docs/sources/commandline/command/start.rst
  83. +0 −15 docs/sources/commandline/command/stop.rst
  84. +0 −15 docs/sources/commandline/command/tag.rst
  85. +0 −13 docs/sources/commandline/command/top.rst
  86. +0 −7 docs/sources/commandline/command/version.rst
  87. +0 −13 docs/sources/commandline/command/wait.rst
  88. BIN docs/sources/{static_files → commandline}/docker_images.gif
  89. +2 −33 docs/sources/commandline/index.rst
  90. +14 −1 docs/sources/contributing/contributing.rst
  91. +1 −1 docs/sources/examples/hello_world.rst
  92. +2 −1 docs/sources/examples/index.rst
  93. +126 −0 docs/sources/examples/linking_into_redis.rst
  94. +0 −2 docs/sources/index.rst
  95. +1 −1 docs/sources/installation/kernel.rst
  96. +4 −2 docs/sources/installation/ubuntulinux.rst
  97. +1 −1 docs/sources/use/baseimages.rst
  98. +3 −1 docs/sources/use/basics.rst
  99. +1 −1 docs/sources/use/builder.rst
  100. +125 −0 docs/sources/use/host_integration.rst
  101. +1 −0 docs/sources/use/index.rst
  102. +7 −1 docs/theme/docker/layout.html
  103. +1 −0 gograph/MAINTAINERS
  104. +423 −0 gograph/gograph.go
  105. +503 −0 gograph/gograph_test.go
  106. +27 −0 gograph/sort.go
  107. +29 −0 gograph/sort_test.go
  108. +32 −0 gograph/utils.go
  109. +20 −11 hack/PACKAGERS.md
  110. +29 −3 hack/dind
  111. +88 −2 hack/infrastructure/README.md
  112. +0 −103 hack/infrastructure/overview.md
  113. +25 −6 hack/install.sh
  114. +9 −5 hack/make.sh
  115. +2 −3 hack/make/binary
  116. +15 −0 hack/make/dynbinary
  117. +42 −0 hack/make/dyntest
  118. +4 −1 hack/make/test
  119. +30 −29 hack/make/ubuntu
  120. +60 −15 hack/release.sh
  121. +2 −2 image.go
  122. +1 −0 iptables/MAINTAINERS
  123. +110 −0 iptables/iptables.go
  124. +18 −0 iptables/iptables_test.go
  125. +0 −1 library/MAINTAINERS
  126. +0 −1 library/busybox
  127. +0 −2 library/hipache
  128. +0 −7 library/ubuntu
  129. +144 −0 links.go
  130. +113 −0 links_test.go
  131. +3 −1 lxc_template.go
  132. +30 −0 namesgenerator/names-generator.go
  133. +28 −0 namesgenerator/names-generator_test.go
  134. +548 −0 netlink/netlink.go
  135. +146 −206 network.go
  136. +7 −114 network_test.go
  137. +1 −0 proxy/MAINTAINERS
  138. +2 −7 { → proxy}/network_proxy_test.go
  139. +29 −0 proxy/proxy.go
  140. +93 −0 proxy/tcp_proxy.go
  141. +1 −115 network_proxy.go → proxy/udp_proxy.go
  142. +3 −2 registry/registry.go
  143. +186 −52 runtime.go
  144. +369 −66 runtime_test.go
  145. +161 −58 server.go
  146. +22 −25 server_test.go
  147. +47 −0 sorter.go
  148. +36 −0 sorter_test.go
  149. +5 −5 state.go
  150. +17 −6 { → sysinit}/sysinit.go
  151. +153 −20 utils.go
  152. +11 −0 utils/signal.go
  153. +44 −0 utils/signal_darwin.go
  154. +47 −0 utils/signal_linux.go
  155. +113 −9 utils/utils.go
  156. +28 −5 utils/utils_test.go
  157. +162 −50 utils_test.go
  158. +404 −0 vendor/src/code.google.com/p/gosqlite/sqlite/sqlite.go
  159. +498 −0 vendor/src/code.google.com/p/gosqlite/sqlite3/driver.go
  160. +1 −1 z_final_test.go
View
@@ -17,3 +17,4 @@ docs/_templates
bundles/
.hg/
.git/
vendor/pkg/
View
@@ -151,6 +151,7 @@ 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>
@@ -185,4 +186,5 @@ 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>
View
@@ -1,5 +1,34 @@
# 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
View
@@ -33,15 +33,13 @@ 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
run apt-get install -y -q build-essential libsqlite3-dev
# Install Go from source (for eventual cross-compiling)
env CGO_ENABLED 0
run curl -s https://go.googlecode.com/files/go1.1.2.src.tar.gz | tar -v -C / -xz && mv /go /goroot
run cd /goroot/src && ./make.bash
env GOROOT /goroot
env PATH $PATH:/goroot/bin
# 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
View
5 NOTICE
@@ -1,8 +1,7 @@
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.
View
@@ -193,10 +193,10 @@ wrong or incomplete.
*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.
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.
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
View
@@ -1 +1 @@
0.6.4
0.6.5
View
53 api.go
@@ -42,6 +42,9 @@ func hijackServer(w http.ResponseWriter) (io.ReadCloser, io.Writer, error) {
//If we don't do this, POST method without Content-type (even with empty body) will fail
func parseForm(r *http.Request) error {
if r == nil {
return nil
}
if err := r.ParseForm(); err != nil && !strings.HasPrefix(err.Error(), "mime:") {
return err
}
@@ -69,12 +72,12 @@ func httpError(w http.ResponseWriter, err error) {
statusCode = http.StatusUnauthorized
} else if strings.Contains(err.Error(), "hasn't been activated") {
statusCode = http.StatusForbidden
}
}
if err != nil {
utils.Errorf("HTTP Error: statusCode=%d %s", statusCode, err.Error())
http.Error(w, err.Error(), statusCode)
}
http.Error(w, err.Error(), statusCode)
}
}
func writeJSON(w http.ResponseWriter, code int, v interface{}) error {
@@ -135,8 +138,23 @@ func postContainersKill(srv *Server, version float64, w http.ResponseWriter, r *
if vars == nil {
return fmt.Errorf("Missing parameter")
}
if err := parseForm(r); err != nil {
return err
}
name := vars["name"]
if err := srv.ContainerKill(name); err != nil {
signal := 0
if r != nil {
s := r.Form.Get("signal")
if s != "" {
if s, err := strconv.Atoi(s); err != nil {
return err
} else {
signal = s
}
}
}
if err := srv.ContainerKill(name, signal); err != nil {
return err
}
w.WriteHeader(http.StatusNoContent)
@@ -503,8 +521,12 @@ func postImagesPush(srv *Server, version float64, w http.ResponseWriter, r *http
}
func postContainersCreate(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := parseForm(r); err != nil {
return nil
}
config := &Config{}
out := &APIRun{}
name := r.Form.Get("name")
if err := json.NewDecoder(r.Body).Decode(config); err != nil {
return err
@@ -515,16 +537,19 @@ func postContainersCreate(srv *Server, version float64, w http.ResponseWriter, r
return err
}
if !config.NetworkDisabled && len(config.Dns) == 0 && len(srv.runtime.Dns) == 0 && utils.CheckLocalDns(resolvConf) {
if !config.NetworkDisabled && len(config.Dns) == 0 && len(srv.runtime.config.Dns) == 0 && utils.CheckLocalDns(resolvConf) {
out.Warnings = append(out.Warnings, fmt.Sprintf("Docker detected local DNS server on resolv.conf. Using default external servers: %v", defaultDns))
config.Dns = defaultDns
}
id, err := srv.ContainerCreate(config)
id, warnings, err := srv.ContainerCreate(config, name)
if err != nil {
return err
}
out.ID = id
for _, warning := range warnings {
out.Warnings = append(out.Warnings, warning)
}
if config.Memory > 0 && !srv.runtime.capabilities.MemoryLimit {
log.Println("WARNING: Your kernel does not support memory limit capabilities. Limitation discarded.")
@@ -570,12 +595,17 @@ func deleteContainers(srv *Server, version float64, w http.ResponseWriter, r *ht
return fmt.Errorf("Missing parameter")
}
name := vars["name"]
removeVolume, err := getBoolParam(r.Form.Get("v"))
if err != nil {
return err
}
removeLink, err := getBoolParam(r.Form.Get("link"))
if err != nil {
return err
}
if err := srv.ContainerDestroy(name, removeVolume); err != nil {
if err := srv.ContainerDestroy(name, removeVolume, removeLink); err != nil {
return err
}
w.WriteHeader(http.StatusNoContent)
@@ -622,6 +652,10 @@ func postContainersStart(srv *Server, version float64, w http.ResponseWriter, r
return fmt.Errorf("Missing parameter")
}
name := vars["name"]
// Register any links from the host config before starting the container
if err := srv.RegisterLinks(name, hostConfig); err != nil {
return err
}
if err := srv.ContainerStart(name, hostConfig); err != nil {
return err
}
@@ -655,6 +689,7 @@ func postContainersWait(srv *Server, version float64, w http.ResponseWriter, r *
return fmt.Errorf("Missing parameter")
}
name := vars["name"]
status, err := srv.ContainerWait(name)
if err != nil {
return err
@@ -975,7 +1010,7 @@ func makeHttpHandler(srv *Server, logging bool, localMethod string, localRoute s
if err != nil {
version = APIVERSION
}
if srv.enableCors {
if srv.runtime.config.EnableCors {
writeCorsHeaders(w, r)
}
View
@@ -1,7 +1,5 @@
package docker
import "encoding/json"
type APIHistory struct {
ID string `json:"Id"`
Tags []string `json:",omitempty"`
@@ -52,17 +50,18 @@ type APIContainers struct {
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,
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,
}
}
@@ -96,14 +95,7 @@ type APIPort struct {
PrivatePort int64
PublicPort int64
Type string
}
func (port *APIPort) MarshalJSON() ([]byte, error) {
return json.Marshal(map[string]interface{}{
"PrivatePort": port.PrivatePort,
"PublicPort": port.PublicPort,
"Type": port.Type,
})
IP string
}
type APIVersion struct {
Oops, something went wrong.

0 comments on commit 4f6ce1b

Please sign in to comment.