mirror of https://github.com/docker/docs.git
Merge pull request #428 from ehazlett/fix-dns-length-azure
fix issue with name and dns length in azure
This commit is contained in:
commit
62f46b207f
|
@ -111,6 +111,12 @@ func NewDriver(machineName string, storePath string, caCert string, privateKey s
|
|||
t := time.Now().Format("20060102150405")
|
||||
name := fmt.Sprintf("%s-%s", machineName, t)
|
||||
|
||||
// trim name to 24 chars due to the azure dns name limit
|
||||
if len(name) > 24 {
|
||||
name = name[0:24]
|
||||
|
||||
}
|
||||
|
||||
driver := &Driver{MachineName: name, storePath: storePath, CaCertPath: caCert, PrivateKeyPath: privateKey}
|
||||
return driver, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue