mirror of
https://github.com/docker/docs.git
synced 2026-04-01 08:48:56 +07:00
Merge pull request #428 from ehazlett/fix-dns-length-azure
fix issue with name and dns length in azure
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user