mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 22:39:41 +02:00
fix(service-creation) - issue with bind mount (#882)
This commit is contained in:
parent
de2818de4c
commit
949f14b119
1 changed files with 1 additions and 6 deletions
|
@ -176,12 +176,7 @@ function ($scope, $state, Service, ServiceHelper, Volume, Network, ImageHelper,
|
||||||
function prepareVolumes(config, input) {
|
function prepareVolumes(config, input) {
|
||||||
input.Volumes.forEach(function (volume) {
|
input.Volumes.forEach(function (volume) {
|
||||||
if (volume.Source && volume.Target) {
|
if (volume.Source && volume.Target) {
|
||||||
var mount = {};
|
config.TaskTemplate.ContainerSpec.Mounts.push(volume);
|
||||||
mount.Type = volume.Bind ? 'bind' : 'volume';
|
|
||||||
mount.ReadOnly = volume.ReadOnly ? true : false;
|
|
||||||
mount.Source = volume.Source;
|
|
||||||
mount.Target = volume.Target;
|
|
||||||
config.TaskTemplate.ContainerSpec.Mounts.push(mount);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue