Skip to content

Commit 38a4afd

Browse files
author
Quentin Perez
committed
Merge pull request #44 from QuentinPerez/user
Add --scaleway-user
2 parents 6455235 + 44184bf commit 38a4afd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Options:
6666
--scaleway-name Assign a name [$SCALEWAY_NAME]
6767
--scaleway-organization Scaleway organization [$SCALEWAY_ORGANIZATION]
6868
--scaleway-token Scaleway token [$SCALEWAY_TOKEN]
69+
--scaleway-user "root" Specifies SSH user name [$SCALEWAY_USER]
6970
--scaleway-volumes Attach additional volume (e.g., 50G) [$SCALEWAY_VOLUMES]
7071
--swarm Configure Machine with Swarm
7172
--swarm-addr addr to advertise for Swarm (default: detect and use the machine IP)
@@ -187,7 +188,7 @@ More [examples](https://github.com/scaleway/docker-machine-driver-scaleway/tree/
187188

188189
### master (unreleased)
189190

190-
* No entry
191+
* Add `--scaleway-user`
191192

192193
View full [commits list](https://github.com/scaleway/docker-machine-driver-scaleway/compare/v1.2.1...master)
193194

driver/scaleway.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) (err error) {
9090
d.image = flags.String("scaleway-image")
9191
d.ip = flags.String("scaleway-ip")
9292
d.volumes = flags.String("scaleway-volumes")
93+
d.BaseDriver.SSHUser = flags.String("scaleway-user")
9394
return
9495
}
9596

@@ -142,6 +143,12 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
142143
Usage: "Attach additional volume (e.g., 50G)",
143144
Value: "",
144145
},
146+
mcnflag.StringFlag{
147+
EnvVar: "SCALEWAY_USER",
148+
Name: "scaleway-user",
149+
Usage: "Specifies SSH user name",
150+
Value: drivers.DefaultSSHUser,
151+
},
145152
mcnflag.BoolFlag{
146153
EnvVar: "SCALEWAY_DEBUG",
147154
Name: "scaleway-debug",

0 commit comments

Comments
 (0)