-
Notifications
You must be signed in to change notification settings - Fork 54
feat: install prototype #47
feat: install prototype #47
Conversation
cmd/duffle/install.go
Outdated
- VERBOSE: "true" turns on extra output | ||
|
||
Example: | ||
$ VERBOSE=true duffle install -d docker install my_release duffle/example:0.1.0 |
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.
Just nitpicking, but this doesn't work on Windows... Environment variables have to be passed through either set
in CMD, or $Env:
in PowerShell.
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.
so would it be:
$> set VERBOSE=true
$> duffle install -d docker install my_release duffle/example:0.1.0
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.
Yeah, that or
$ $env:VERBOSE = true
$ duffle install -d docker install my_release duffle/example:0.1.0
I'm not sure if the Windows community uses Powershell or CMD more often, but your comment looks good.
}, | ||
} | ||
|
||
//cmd.Flags().StringSliceP("credentials", "c", []string{}, "Specify one or more credential sets") |
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.
Is this where we would provide a credential set?
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.
Yeah.
I'm going to write up some better documentation on how all of this works. I realize, looking back, that there is a lot of stuff going on here. |
aa0414a
to
4fe2bb1
Compare
Whenever I try to run this I get:
|
@radu-matei can you add Right now it is shelling out to the Actually, that later one will be very useful because it will show all of the arguments it is passing to Docker. |
I built an image based on the Dockerifle in
|
If you do |
If I exec manually in the container:
|
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.
This appears to be a Windows-only issue. I think it's ok to merge for now and track down what is failing on Windows later.
LGTM
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.
one minor design comment we may wanna discuss after the POC, but LGTM for a POC :)
} | ||
|
||
func validateDockerish(s string) error { | ||
if !strings.Contains(s, ":") { |
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.
with this requirement, it means we can never imply that duffle install my_release duffle/example
implies the latest version. Is there a way we can loosen this requirement, or is this intentional by design?
This provides a prototype implementation of `duffle install` that should make it possible to easily create verbs for each of the CNAB actions. Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
This can now actually run installs of CNAB images
6daf1b4
to
edd3e22
Compare
This is a prototype of
duffle install
that has two different drivers, one of which is a basic Docker driver.With the docker driver, you can actually run the install target on a CNAB image:
$ duffle install myname technosophos/helloworld:0.1.0
It is possible to inject driver-specific configuration via environment variables. While this is basically a demo for this release, it will be very important for ACI support. Run
duffle install -h
for more.Depends on #46
NB: I'm home basically by myself today with nothing else to do, so I hereby declare that this does not count as working on a Saturday.