mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
add domainname & dns to API, #11.
This commit is contained in:
@@ -561,9 +561,14 @@ func (manager *RoomManagerCtx) Create(settings types.RoomSettings) (string, erro
|
||||
// Set container configs
|
||||
//
|
||||
|
||||
hostname := containerName
|
||||
if settings.Hostname != "" {
|
||||
hostname = settings.Hostname
|
||||
}
|
||||
|
||||
config := &container.Config{
|
||||
// Hostname
|
||||
Hostname: containerName,
|
||||
Hostname: hostname,
|
||||
// Domainname is preventing from running container on LXC (Proxmox)
|
||||
// https://www.gitmemory.com/issue/docker/for-linux/743/524569376
|
||||
// Domainname: containerName,
|
||||
@@ -605,6 +610,8 @@ func (manager *RoomManagerCtx) Create(settings types.RoomSettings) (string, erro
|
||||
DeviceRequests: deviceRequests,
|
||||
Devices: devices,
|
||||
},
|
||||
// DNS
|
||||
DNS: settings.DNS,
|
||||
// Privileged
|
||||
Privileged: isPrivilegedImage,
|
||||
}
|
||||
@@ -803,6 +810,8 @@ func (manager *RoomManagerCtx) GetSettings(id string) (*types.RoomSettings, erro
|
||||
Labels: labels.UserDefined,
|
||||
Mounts: mounts,
|
||||
Resources: roomResources,
|
||||
Hostname: container.Config.Hostname,
|
||||
DNS: container.HostConfig.DNS,
|
||||
BrowserPolicy: browserPolicy,
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,9 @@ type RoomSettings struct {
|
||||
Mounts []RoomMount `json:"mounts"`
|
||||
Resources RoomResources `json:"resources"`
|
||||
|
||||
Hostname string `json:"hostname,omitempty"`
|
||||
DNS []string `json:"dns,omitempty"`
|
||||
|
||||
BrowserPolicy *BrowserPolicy `json:"browser_policy,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user