зеркало из https://github.com/microsoft/docker.git
bump to master
This commit is contained in:
Коммит
b6825f98c0
|
@ -1,5 +1,10 @@
|
|||
# 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)
|
||||
+ 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.
|
||||
|
|
|
@ -65,7 +65,7 @@ func Changes(layers []string, rw string) ([]Change, error) {
|
|||
file := filepath.Base(path)
|
||||
// If there is a whiteout, then the file was removed
|
||||
if strings.HasPrefix(file, ".wh.") {
|
||||
originalFile := strings.TrimPrefix(file, ".wh.")
|
||||
originalFile := file[len(".wh."):]
|
||||
change.Path = filepath.Join(filepath.Dir(path), originalFile)
|
||||
change.Kind = ChangeDelete
|
||||
} else {
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
"unicode"
|
||||
)
|
||||
|
||||
const VERSION = "0.3.4"
|
||||
const VERSION = "0.4.0"
|
||||
|
||||
var (
|
||||
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
|
||||
- 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.
|
||||
|
|
|
@ -64,7 +64,11 @@ func (r *Registry) LookupRemoteImage(imgId, registry string, authConfig *auth.Au
|
|||
}
|
||||
req.SetBasicAuth(authConfig.Username, authConfig.Password)
|
||||
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) {
|
||||
|
@ -152,16 +156,19 @@ func (r *Registry) GetRemoteTags(registries []string, repository string, token [
|
|||
}
|
||||
req.Header.Set("Authorization", "Token "+strings.Join(token, ", "))
|
||||
res, err := r.client.Do(req)
|
||||
defer res.Body.Close()
|
||||
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
|
||||
} else if res.StatusCode == 404 {
|
||||
return nil, fmt.Errorf("Repository not found")
|
||||
}
|
||||
|
||||
result := make(map[string]string)
|
||||
|
||||
rawJson, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -467,9 +474,15 @@ type Registry struct {
|
|||
}
|
||||
|
||||
func NewRegistry(root string, authConfig *auth.AuthConfig) *Registry {
|
||||
httpTransport := &http.Transport{
|
||||
DisableKeepAlives: true,
|
||||
}
|
||||
|
||||
r := &Registry{
|
||||
authConfig: authConfig,
|
||||
client: &http.Client{},
|
||||
client: &http.Client{
|
||||
Transport: httpTransport,
|
||||
},
|
||||
}
|
||||
r.client.Jar = cookiejar.NewCookieJar()
|
||||
return r
|
||||
|
|
|
@ -321,6 +321,7 @@ func (srv *Server) pullImage(r *registry.Registry, out io.Writer, imgId, endpoin
|
|||
if err != nil {
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче