mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-01-07 07:19:37 -05:00
add prefix 'library' only to official images in the path (#27)
This commit is contained in:
parent
b06fa7e2ba
commit
98bede4dbe
1 changed files with 5 additions and 3 deletions
|
|
@ -41,9 +41,11 @@ func dataSourceDockerRegistryImageRead(d *schema.ResourceData, meta interface{})
|
|||
pullOpts.Repository = strings.Replace(pullOpts.Repository, pullOpts.Registry+"/", "", 1)
|
||||
}
|
||||
|
||||
// Docker prefixes 'library' to official images in the path; 'consul' becomes 'library/consul'
|
||||
if !strings.Contains(pullOpts.Repository, "/") {
|
||||
pullOpts.Repository = "library/" + pullOpts.Repository
|
||||
if pullOpts.Registry == "registry.hub.docker.com" {
|
||||
// Docker prefixes 'library' to official images in the path; 'consul' becomes 'library/consul'
|
||||
if !strings.Contains(pullOpts.Repository, "/") {
|
||||
pullOpts.Repository = "library/" + pullOpts.Repository
|
||||
}
|
||||
}
|
||||
|
||||
if pullOpts.Tag == "" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue