Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Image Tags #404

Open
LongLiveCHIEF opened this issue Jan 11, 2016 · 3 comments
Open

Multiple Image Tags #404

LongLiveCHIEF opened this issue Jan 11, 2016 · 3 comments
Labels

Comments

@LongLiveCHIEF
Copy link

I'm trying to download multiple tags of the same image, and running into difficulty. As an example, I'm trying to pull various versions of sameersbn/gitlab, so I can do some automation relevant to my deployments.

First, I tried:

// manifest/init.pp
docker::image { 'sameersbn/gitlab':
  image_tag => '7.13.2'
}

docker::image {'sameersbn/gitlab':
  image_tag => '7.14.3'
}

This gave me the duplicate error mentioned in #364. Then, I followed the advice @garethr left in that post, and I now have:

docker::image { 'gitlab-7.13':
  name => 'sameersbn/gitlab',
  image_tag => '7.13.2'
}

docker::image { 'gitlab-7.14':
  name => 'sameersbn/gitlab',
  image_tag => '7.14.3'
}

I'm now getting a puppet parsing error: Cannot alias Docker::Image[gitlab-7.14] to ["sameersbn/gitlab"], resource ["Docker::Image", "sameersbn/gitlab"] already declared. Here's the full log output:

==> default: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias Docker::Image[gitlab-7.14] to ["sameersbn/gitlab"] at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/init.pp:11; resource ["Docker::Image", "sameersbn/gitlab"] already declared at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/init.pp:6 at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/init.pp:11 on node gitlab.notrealhostname
==> default: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias Docker::Image[gitlab-7.14] to ["sameersbn/gitlab"] at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/init.pp:11; resource ["Docker::Image", "sameersbn/gitlab"] already declared at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/init.pp:6 at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/init.pp:11 on node gitlab.notrealhostname
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
@garethr garethr added the bug label Jan 19, 2016
@johnzimm
Copy link

Did anyone find a suitable way to do this with the module? I'm trying to pass in a hash to docker::images to pull several tags of the same image/project.

@mterzo
Copy link
Contributor

mterzo commented Oct 15, 2016

Use image =>.

@johnzimm
Copy link

Ah. Thanks. For some reason I was trying to use "name" like above and didn't think about using image instead. Working now.

cegeka-jenkins pushed a commit to cegeka/puppet-docker that referenced this issue Apr 17, 2024
* fixing storage tests for deiban & ubuntu

* removes all running containers so as to not interfere with other tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants