mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-04 17:33:21 +08:00
Allow to specify image new when creating instances (#84)
This commit is contained in:
@@ -91,8 +91,11 @@ func getDindImageName() string {
|
||||
return dindImage
|
||||
}
|
||||
|
||||
func NewInstance(session *Session) (*Instance, error) {
|
||||
log.Printf("NewInstance - using image: [%s]\n", dindImage)
|
||||
func NewInstance(session *Session, imageName string) (*Instance, error) {
|
||||
if imageName == "" {
|
||||
imageName = dindImage
|
||||
}
|
||||
log.Printf("NewInstance - using image: [%s]\n", imageName)
|
||||
instance, err := CreateInstance(session, dindImage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user