luci-app-dockerman: sync with upstream source
This commit is contained in:
parent
634f01c35c
commit
ec3418fed1
@ -115,7 +115,7 @@ local start_stop_remove = function(m, cmd)
|
||||
end
|
||||
end
|
||||
|
||||
m=SimpleForm("docker", container_info.Name:sub(2), translate("Docker Contaienr") )
|
||||
m=SimpleForm("docker", container_info.Name:sub(2), translate("Docker Container") )
|
||||
m.template = "docker/cbi/xsimpleform"
|
||||
m.redirect = luci.dispatcher.build_url("admin/docker/containers")
|
||||
-- m:append(Template("docker/container"))
|
||||
|
||||
@ -328,7 +328,7 @@ m.handle = function(self, state, data)
|
||||
local interactive = type(data.interactive) == "number" and (data.interactive == 1 and true or false) or default_config.interactive or false
|
||||
local image = data.image
|
||||
local user = data.user
|
||||
if not image:match(".-:.+") then
|
||||
if image and not image:match(".-:.+") then
|
||||
image = image .. ":latest"
|
||||
end
|
||||
local privileged = type(data.privileged) == "number" and (data.privileged == 1 and true or false) or default_config.privileged or false
|
||||
|
||||
@ -150,17 +150,20 @@ m.handle = function(self, state, data)
|
||||
Internal = internal
|
||||
}
|
||||
|
||||
if subnet or gateway or ip_range or next(aux_address)~=nil then
|
||||
if subnet or gateway or ip_range then
|
||||
create_body["IPAM"]["Config"] = {
|
||||
{
|
||||
Subnet = subnet,
|
||||
Gateway = gateway,
|
||||
IPRange = ip_range,
|
||||
-- AuxAddress = aux_address
|
||||
AuxiliaryAddresses = aux_address
|
||||
-- AuxiliaryAddresses = aux_address
|
||||
}
|
||||
}
|
||||
end
|
||||
if next(aux_address)~=nil then
|
||||
create_body["IPAM"]["Config"]["AuxiliaryAddresses"] = aux_address
|
||||
end
|
||||
if driver == "macvlan" then
|
||||
create_body["IPAM"]["Options"] = {
|
||||
macvlan_mode = data.macvlan_mode,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user