Skip to content

Commit 4bd5701

Browse files
committed
Support pulling private images
1 parent c919e4e commit 4bd5701

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

commands/create.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
type Create struct {
1212
Handle string `short:"n" long:"handle" description:"name to give container"`
1313
RootFS string `short:"r" long:"rootfs" description:"rootfs image with which to create the container"`
14+
Username string `long:"username" description:"username for private registry"`
15+
Password string `long:"password" description:"password for private registry"`
1416
Env []string `short:"e" long:"env" description:"set environment variables"`
1517
Grace time.Duration `short:"g" long:"grace" description:"grace time (resetting ttl) of container"`
1618
Privileged bool `short:"p" long:"privileged" description:"privileged user in the container is privileged in the host"`
@@ -38,7 +40,7 @@ func (command *Create) Execute(args []string) error {
3840
container, err := globalClient().Create(garden.ContainerSpec{
3941
Handle: command.Handle,
4042
GraceTime: command.Grace,
41-
RootFSPath: command.RootFS,
43+
Image: garden.ImageRef{URI: command.RootFS, Username: command.Username, Password: command.Password},
4244
Privileged: command.Privileged,
4345
Env: command.Env,
4446
Network: command.Network,

0 commit comments

Comments
 (0)