Skip to content
Commits on Source (2)
......@@ -15,8 +15,8 @@ You can find sources and pre-compiled binaries [here](https://github.com/JonasPr
```bash
# Download the binary (this example downloads the binary for linux amd64)
$ wget https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/3.7.0/docker-machine-driver-hetzner_3.7.0_linux_amd64.tar.gz
$ tar -xvf docker-machine-driver-hetzner_3.7.0_linux_amd64.tar.gz
$ wget https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/3.7.1/docker-machine-driver-hetzner_3.7.1_linux_amd64.tar.gz
$ tar -xvf docker-machine-driver-hetzner_3.7.1_linux_amd64.tar.gz
# Make it executable and copy the binary in a directory accessible with your $PATH
$ chmod +x docker-machine-driver-hetzner
......
......@@ -76,15 +76,15 @@ const (
flagPlacementGroup = "hetzner-placement-group"
flagAutoSpread = "hetzner-auto-spread"
flagSshUser = "hetzner-ssh-user"
flagSshPort = "hetzner-ssh-port"
flagSshUser = "hetzner-ssh-user"
flagSshPort = "hetzner-ssh-port"
labelNamespace = "docker-machine"
labelAutoSpreadPg = "auto-spread"
labelAutoCreated = "auto-created"
autoSpreadPgName = "__auto_spread"
defaultSSHPort = 22
defaultSSHUser = "root"
)
......@@ -95,8 +95,7 @@ func NewDriver() *Driver {
Image: defaultImage,
Type: defaultType,
IsExistingKey: false,
BaseDriver: &drivers.BaseDriver{
},
BaseDriver: &drivers.BaseDriver{},
}
}
......@@ -242,7 +241,7 @@ func (d *Driver) SetConfigFromFlags(opts drivers.DriverOptions) error {
d.SSHUser = opts.String(flagSshUser)
d.SSHPort = opts.Int(flagSshPort)
d.placementGroup = opts.String(flagPlacementGroup)
if opts.Bool(flagAutoSpread) {
if d.placementGroup != "" {
......@@ -269,10 +268,12 @@ func (d *Driver) SetConfigFromFlags(opts drivers.DriverOptions) error {
return nil
}
// GetSSHUsername retrieves the SSH username used to connect to the server during provisioning
func (d *Driver) GetSSHUsername() string {
return d.SSHUser
}
// GetSSHPort retrieves the port used to connect to the server during provisioning
func (d *Driver) GetSSHPort() (int, error) {
return d.SSHPort, nil
}
......
......@@ -3,11 +3,14 @@ module github.com/JonasProgrammer/docker-machine-driver-hetzner
go 1.12
require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/docker/docker v0.0.0-20181018193557-f7e5154f37a4 // indirect
github.com/docker/docker v20.10.14+incompatible // indirect
github.com/docker/machine v0.16.2
github.com/hetznercloud/hcloud-go v1.32.0
github.com/hetznercloud/hcloud-go v1.33.1
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/pkg/errors v0.9.1
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
gotest.tools v2.2.0+incompatible // indirect
github.com/prometheus/common v0.33.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)
This diff is collapsed.