Skip to content

Commit

Permalink
Support unofficial docker registries.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejholmes committed Dec 13, 2015
1 parent d1e1ad5 commit c9907ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion empire.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package empire // import "github.com/remind101/empire"

import (
"fmt"
"io"
"io/ioutil"

Expand Down Expand Up @@ -298,9 +299,14 @@ func PullAndExtract(c *dockerutil.Client) ProcfileExtractor {
)

return ProcfileExtractor(func(ctx context.Context, img image.Image, w io.Writer) (procfile.Procfile, error) {
repo := img.Repository
if img.Registry != "" {
repo = fmt.Sprintf("%s/%s", img.Registry, img.Repository)
}

if err := c.PullImage(ctx, docker.PullImageOptions{
Registry: img.Registry,
Repository: img.Repository,
Repository: repo,
Tag: img.Tag,
OutputStream: w,
RawJSONStream: true,
Expand Down

0 comments on commit c9907ea

Please sign in to comment.