diff --git a/app/components/startContainer/startContainerController.js b/app/components/startContainer/startContainerController.js index b7f699d84..f913d55a6 100644 --- a/app/components/startContainer/startContainerController.js +++ b/app/components/startContainer/startContainerController.js @@ -23,7 +23,8 @@ function($scope, $routeParams, $location, Container, Messages, containernameFilt CapAdd: [], CapDrop: [], Devices: [], - LxcConf: [] + LxcConf: [], + ExtraHosts: [] } }; @@ -76,6 +77,7 @@ function($scope, $routeParams, $location, Container, Messages, containernameFilt prev[cur.name] = cur.value; return prev; }, {}); + config.HostConfig.ExtraHosts = config.HostConfig.ExtraHosts.map(function(entry) {return entry.host + ':' + entry.ip;}); var ExposedPorts = {}; var PortBindings = {}; diff --git a/app/components/startContainer/startContainerController.spec.js b/app/components/startContainer/startContainerController.spec.js index b8c6f398e..6b359306e 100644 --- a/app/components/startContainer/startContainerController.spec.js +++ b/app/components/startContainer/startContainerController.spec.js @@ -156,6 +156,7 @@ describe('startContainerController', function() { CapDrop: ['cap_foo_bar'], Devices: [{ 'PathOnHost': '/dev/deviceName', 'PathInContainer': '/dev/deviceName', 'CgroupPermissions': 'mrw'}], LxcConf: {'lxc.utsname':'docker'}, + ExtraHosts: ['hostname:127.0.0.1'], RestartPolicy: {name: 'always', MaximumRetryCount: 5} }, name: 'container-name' @@ -191,6 +192,7 @@ describe('startContainerController', function() { scope.config.HostConfig.RestartPolicy = {name: 'always', MaximumRetryCount: 5}; scope.config.HostConfig.Devices = [{ 'PathOnHost': '/dev/deviceName', 'PathInContainer': '/dev/deviceName', 'CgroupPermissions': 'mrw'}]; scope.config.HostConfig.LxcConf = [{name: 'lxc.utsname', value: 'docker'}]; + scope.config.HostConfig.ExtraHosts = [{host: 'hostname', ip: '127.0.0.1'}]; scope.create(); $httpBackend.flush(); diff --git a/app/components/startContainer/startcontainer.html b/app/components/startContainer/startcontainer.html index 4e5290e6f..681aa34e1 100644 --- a/app/components/startContainer/startcontainer.html +++ b/app/components/startContainer/startcontainer.html @@ -226,6 +226,25 @@
+
+ +
+
+
+ + +
+
+ + +
+
+ +
+
+
+ +
diff --git a/dist/dockerui.js b/dist/dockerui.js index 381fc5c10..5b7e62e8e 100644 --- a/dist/dockerui.js +++ b/dist/dockerui.js @@ -526,7 +526,8 @@ function($scope, $routeParams, $location, Container, Messages, containernameFilt CapAdd: [], CapDrop: [], Devices: [], - LxcConf: [] + LxcConf: [], + ExtraHosts: [] } }; @@ -579,6 +580,7 @@ function($scope, $routeParams, $location, Container, Messages, containernameFilt prev[cur.name] = cur.value; return prev; }, {}); + config.HostConfig.ExtraHosts = config.HostConfig.ExtraHosts.map(function(entry) {return entry.host + ':' + entry.ip;}); var ExposedPorts = {}; var PortBindings = {}; @@ -1751,6 +1753,25 @@ angular.module("app/components/startContainer/startcontainer.html", []).run(["$t "
\n" + "
\n" + "
\n" + + " \n" + + "
\n" + + "
\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + "
\n" + + " \n" + + "
\n" + + "
\n" + + "
\n" + + " \n" + + "
\n" + + "
\n" + " \n" + "
\n" + "
\n" + diff --git a/dist/templates/app.js b/dist/templates/app.js index 0015a9879..b87ec2b2b 100644 --- a/dist/templates/app.js +++ b/dist/templates/app.js @@ -774,6 +774,25 @@ angular.module("app/components/startContainer/startcontainer.html", []).run(["$t "
\n" + "
\n" + "
\n" + + " \n" + + "
\n" + + "
\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + "
\n" + + " \n" + + "
\n" + + "
\n" + + "
\n" + + " \n" + + "
\n" + + "
\n" + " \n" + "
\n" + "
\n" +