Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Add changes to import image
Browse files Browse the repository at this point in the history
  • Loading branch information
subhraveti committed Jun 7, 2015
1 parent 142d8fe commit d2a4eb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dockerclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ func (client *DockerClient) RenameContainer(oldName string, newName string) erro
return err
}

func (client *DockerClient) ImportImage(source string, repository string, tag string, tar io.Reader) (io.ReadCloser, error) {
func (client *DockerClient) ImportImage(source string, repository string, tag string, changes *[]string, tar io.Reader) (io.ReadCloser, error) {
var fromSrc string
v := &url.Values{}
if source == "" {
Expand All @@ -594,6 +594,9 @@ func (client *DockerClient) ImportImage(source string, repository string, tag st
if tag != "" {
v.Set("tag", tag)
}
for _, change := range *changes {
v.Add("changes", change)
}

var in io.Reader
if fromSrc == "-" {
Expand Down
2 changes: 1 addition & 1 deletion interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ type Client interface {
PauseContainer(name string) error
UnpauseContainer(name string) error
RenameContainer(oldName string, newName string) error
ImportImage(source string, repository string, tag string, tar io.Reader) (io.ReadCloser, error)
ImportImage(source string, repository string, tag string, changes *[]string, tar io.Reader) (io.ReadCloser, error)
}

0 comments on commit d2a4eb1

Please sign in to comment.