Skip to content

Commit

Permalink
Merge pull request moby#6170 from vieux/redirect_login
Browse files Browse the repository at this point in the history
Add redirect and env proxy support to docker login
  • Loading branch information
vieux committed Jun 3, 2014
2 parents f65fadb + 4e72548 commit fd342cb
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions registry/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/dotcloud/docker/utils"
"io/ioutil"
"net/http"
"os"
"path"
"strings"

"github.com/dotcloud/docker/utils"
)

// Where we store the config file
Expand Down Expand Up @@ -152,10 +153,16 @@ func SaveConfig(configFile *ConfigFile) error {
// try to register/login to the registry server
func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, error) {
var (
status string
reqBody []byte
err error
client = &http.Client{}
status string
reqBody []byte
err error
client = &http.Client{
Transport: &http.Transport{
DisableKeepAlives: true,
Proxy: http.ProxyFromEnvironment,
},
CheckRedirect: AddRequiredHeadersToRedirectedRequests,
}
reqStatusCode = 0
serverAddress = authConfig.ServerAddress
)
Expand Down

0 comments on commit fd342cb

Please sign in to comment.