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

docker_image and tags (related to cli_args) #141

Closed
rmoriz opened this issue Apr 30, 2014 · 3 comments
Closed

docker_image and tags (related to cli_args) #141

rmoriz opened this issue Apr 30, 2014 · 3 comments

Comments

@rmoriz
Copy link
Contributor

rmoriz commented Apr 30, 2014

Problem:

docker_image 'ubuntu' do
  tag '12.04'
end

fails:

---- Begin output of docker pull  --tag="12.04" ubuntu ----       
STDOUT:        
STDERR: flag provided but not defined: -tag       

Usage: docker pull NAME       

Pull an image or a repository from the registry       

  -t="": Download tagged image in repository       
---- End output of docker pull  --tag="12.04" ubuntu ----       

For old docker 0.7.x I think the correct syntax/cli arg should be:
docker pull -t="12.04" ubuntu

For future compatibility, this should change, because:
`Warning: '--tag' is deprecated, it will be removed soon. See usage.``

@bflad
Copy link
Contributor

bflad commented May 4, 2014

Great catch. For the deprecation warning, we can just switch docker_image pull method to use the repository_and_tag_args method already available in that provider instead of tag with cli_args. I should release that as a bugfix to our current release shortly.

For older Docker versions, this cookbook does not strive to support versions back too far unfortunately as the Docker project historically has moved very fast with various syntax nuances between the versions. You can likely use an older version of the cookbook, however I'd recommend getting to newer/latest Docker in your environment. I'd entertain accepting a PR if there was a clean implementation for backporting Docker nuances between versions and enough folks were clamoring for the ability.

@bflad bflad closed this as completed in 042a1ec May 5, 2014
bflad added a commit that referenced this issue May 5, 2014
Fix and enhance docker_image pull/push behavior with Docker 0.10, fixes #141
@bflad
Copy link
Contributor

bflad commented May 5, 2014

I released the fix for the deprecated --tag in 0.34.2. If you or anyone else would like to submit a PR for per-version support for Docker syntax, I'd be happy to look through it. Thanks!

@rmoriz
Copy link
Contributor Author

rmoriz commented May 5, 2014

awesome. thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants