mirror of https://github.com/docker/docs.git
bump to master
This commit is contained in:
commit
b6825f98c0
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 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)
|
## 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' 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.
|
+ Builder: 'docker build -t FOO' applies the tag FOO to the newly built container.
|
||||||
|
|
|
@ -65,7 +65,7 @@ func Changes(layers []string, rw string) ([]Change, error) {
|
||||||
file := filepath.Base(path)
|
file := filepath.Base(path)
|
||||||
// If there is a whiteout, then the file was removed
|
// If there is a whiteout, then the file was removed
|
||||||
if strings.HasPrefix(file, ".wh.") {
|
if strings.HasPrefix(file, ".wh.") {
|
||||||
originalFile := strings.TrimPrefix(file, ".wh.")
|
originalFile := file[len(".wh."):]
|
||||||
change.Path = filepath.Join(filepath.Dir(path), originalFile)
|
change.Path = filepath.Join(filepath.Dir(path), originalFile)
|
||||||
change.Kind = ChangeDelete
|
change.Kind = ChangeDelete
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import (
|
||||||
"unicode"
|
"unicode"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "0.3.4"
|
const VERSION = "0.4.0"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
GIT_COMMIT string
|
GIT_COMMIT string
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
lxc-docker (0.4.0-1) precise; urgency=low
|
||||||
|
- 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
|
||||||
|
|
||||||
|
-- dotCloud <ops@dotcloud.com> Mon, 03 Jun 2013 00:00:00 -0700
|
||||||
|
|
||||||
lxc-docker (0.3.4-1) precise; urgency=low
|
lxc-docker (0.3.4-1) precise; urgency=low
|
||||||
- Builder: 'docker build' builds a container, layer by layer, from a source repository containing a Dockerfile
|
- 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.
|
- Builder: 'docker build -t FOO' applies the tag FOO to the newly built container.
|
||||||
|
|
|
@ -64,7 +64,11 @@ func (r *Registry) LookupRemoteImage(imgId, registry string, authConfig *auth.Au
|
||||||
}
|
}
|
||||||
req.SetBasicAuth(authConfig.Username, authConfig.Password)
|
req.SetBasicAuth(authConfig.Username, authConfig.Password)
|
||||||
res, err := rt.RoundTrip(req)
|
res, err := rt.RoundTrip(req)
|
||||||
return err == nil && res.StatusCode == 307
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
res.Body.Close()
|
||||||
|
return res.StatusCode == 307
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Registry) getImagesInRepository(repository string, authConfig *auth.AuthConfig) ([]map[string]string, error) {
|
func (r *Registry) getImagesInRepository(repository string, authConfig *auth.AuthConfig) ([]map[string]string, error) {
|
||||||
|
@ -152,16 +156,19 @@ func (r *Registry) GetRemoteTags(registries []string, repository string, token [
|
||||||
}
|
}
|
||||||
req.Header.Set("Authorization", "Token "+strings.Join(token, ", "))
|
req.Header.Set("Authorization", "Token "+strings.Join(token, ", "))
|
||||||
res, err := r.client.Do(req)
|
res, err := r.client.Do(req)
|
||||||
defer res.Body.Close()
|
|
||||||
utils.Debugf("Got status code %d from %s", res.StatusCode, endpoint)
|
utils.Debugf("Got status code %d from %s", res.StatusCode, endpoint)
|
||||||
if err != nil || (res.StatusCode != 200 && res.StatusCode != 404) {
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer res.Body.Close()
|
||||||
|
|
||||||
|
if res.StatusCode != 200 && res.StatusCode != 404 {
|
||||||
continue
|
continue
|
||||||
} else if res.StatusCode == 404 {
|
} else if res.StatusCode == 404 {
|
||||||
return nil, fmt.Errorf("Repository not found")
|
return nil, fmt.Errorf("Repository not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
result := make(map[string]string)
|
result := make(map[string]string)
|
||||||
|
|
||||||
rawJson, err := ioutil.ReadAll(res.Body)
|
rawJson, err := ioutil.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -467,9 +474,15 @@ type Registry struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRegistry(root string, authConfig *auth.AuthConfig) *Registry {
|
func NewRegistry(root string, authConfig *auth.AuthConfig) *Registry {
|
||||||
|
httpTransport := &http.Transport{
|
||||||
|
DisableKeepAlives: true,
|
||||||
|
}
|
||||||
|
|
||||||
r := &Registry{
|
r := &Registry{
|
||||||
authConfig: authConfig,
|
authConfig: authConfig,
|
||||||
client: &http.Client{},
|
client: &http.Client{
|
||||||
|
Transport: httpTransport,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
r.client.Jar = cookiejar.NewCookieJar()
|
r.client.Jar = cookiejar.NewCookieJar()
|
||||||
return r
|
return r
|
||||||
|
|
|
@ -321,6 +321,7 @@ func (srv *Server) pullImage(r *registry.Registry, out io.Writer, imgId, endpoin
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer layer.Close()
|
||||||
if err := srv.runtime.graph.Register(utils.ProgressReader(layer, contentLength, out, sf.FormatProgress("Downloading", "%v/%v (%v)"), sf), false, img); err != nil {
|
if err := srv.runtime.graph.Register(utils.ProgressReader(layer, contentLength, out, sf.FormatProgress("Downloading", "%v/%v (%v)"), sf), false, img); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue