fix: stabilize software updates
This commit is contained in:
1 parent
fc59092030
commit
26a960c6bd
25 files changed
+487
-146
No files matched your search
@@ -304,8 +304,8 @@ func (c *dockerClient) findTarget(ctx context.Context, label string) (containerS
|
||||
return running[0], nil
|
||||
}
|
||||
|
||||
func (c *dockerClient) pullImage(ctx context.Context, repository, tag, username, token string) error {
|
||||
authJSON, _ := json.Marshal(map[string]string{"username": username, "password": token, "serveraddress": strings.Split(repository, "/")[0]})
|
||||
func (c *dockerClient) pullImage(ctx context.Context, repository, tag, username, credential string) error {
|
||||
authJSON, _ := json.Marshal(map[string]string{"username": username, "password": credential, "serveraddress": strings.Split(repository, "/")[0]})
|
||||
headers := http.Header{"X-Registry-Auth": {base64.URLEncoding.EncodeToString(authJSON)}}
|
||||
query := url.Values{"fromImage": {repository}, "tag": {tag}}
|
||||
response, err := c.request(ctx, http.MethodPost, "/images/create?"+query.Encode(), nil, headers, true)
|
||||
|
||||
Reference in new issue
Block a user