Merge pull request #782 from gregory90/fix-759

Don't retag images with tag used for `docker build`
This commit is contained in:
Brad Rydzewski 2015-01-08 22:01:07 -08:00
commit 5afcc88827

View file

@ -99,7 +99,10 @@ func (d *Docker) Write(f *buildfile.Buildfile) {
// Tag and push all tags // Tag and push all tags
for _, tag := range d.Tags { for _, tag := range d.Tags {
if tag != buildImageTag {
f.WriteCmd(fmt.Sprintf("docker tag %s:%s %s:%s", d.ImageName, buildImageTag, d.ImageName, tag)) f.WriteCmd(fmt.Sprintf("docker tag %s:%s %s:%s", d.ImageName, buildImageTag, d.ImageName, tag))
}
f.WriteCmd(fmt.Sprintf("docker push %s:%s", d.ImageName, tag)) f.WriteCmd(fmt.Sprintf("docker push %s:%s", d.ImageName, tag))
} }