-
Notifications
You must be signed in to change notification settings - Fork 124
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
Support for adding docker image tag #230
Support for adding docker image tag #230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
How about tag option including both repo and tag? |
I tried (92db97b)...but it is difficult to support private docker registry.
I think this implementation is the simplest, but it is too bother for users. I'll try to fix. thank you! |
@@ -269,6 +269,15 @@ def disable_sudo? | |||
class Docker < Base | |||
def finalize | |||
image = @backend.commit_container | |||
if @options[:tag] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a bit difficult to understand. any ideas?
@@ -269,6 +269,15 @@ def disable_sudo? | |||
class Docker < Base | |||
def finalize | |||
image = @backend.commit_container | |||
if @options[:tag] | |||
opt = @options[:tag].split(':') | |||
if opt.size > 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use regexp.
[12] pry(main)> /\A(.+?)(|:([^:]+))\z/.match('a')
=> #<MatchData "a" 1:"a" 2:"" 3:nil>
[13] pry(main)> /\A(.+?)(|:([^:]+))\z/.match('a:b')
=> #<MatchData "a:b" 1:"a" 2:":b" 3:"b">
[14] pry(main)> /\A(.+?)(|:([^:]+))\z/.match('a:b:c')
=> #<MatchData "a:b:c" 1:"a:b" 2:":c" 3:"c">
@ryotarai fixed. please review that. |
Thank you! |
released in v1.9.11 |
I added 2 options(repository, tag) to
itamae docker
command.