mirror of https://github.com/portainer/portainer
fix(container-creation): handle extraHosts correctly (#4139)
* fix(container-creation): handle extraHosts correctly * fix(container-creation): refactor for readabilitypull/4173/head
parent
747fdae269
commit
1b88ca2285
|
@ -280,11 +280,10 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
}
|
||||
config.HostConfig.Dns = dnsServers;
|
||||
|
||||
$scope.formValues.ExtraHosts.forEach(function (v) {
|
||||
if (v.value) {
|
||||
config.HostConfig.ExtraHosts.push(v.value);
|
||||
}
|
||||
});
|
||||
config.HostConfig.ExtraHosts = _.map(
|
||||
_.filter($scope.formValues.ExtraHosts, (v) => v.value),
|
||||
'value'
|
||||
);
|
||||
}
|
||||
|
||||
function prepareLabels(config) {
|
||||
|
|
Loading…
Reference in New Issue