Skip to content

Commit

Permalink
Implement tags for docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
pwaller committed Jan 21, 2015
1 parent 147874f commit 35d6055
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log"
"net/http"
"os"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -177,13 +178,20 @@ func (c *Container) Pull(config UpdateEvent) error {
defer close(config.BuildComplete)
}

parts := strings.SplitN(config.Source.dockerImageName, ":", 2)

pio := docker.PullImageOptions{}
pio.Repository = config.Source.dockerImageName
log.Println("Pulling", pio.Repository)
pio.Registry = ""

pio.Repository = parts[0]
pio.Tag = "latest"
if len(parts) == 2 {
pio.Tag = parts[1]
}
pio.Registry = ""
pio.RawJSONStream = true

log.Println("Pulling", pio.Repository)

target := config.OutputStream
if target == nil {
target = os.Stderr
Expand Down

0 comments on commit 35d6055

Please sign in to comment.