Exemple #1
0
        public ContainerBuilder Mount(string fqHostPath, string fqContainerPath, MountType access)
        {
            var hp = Ductus.FluentDocker.Common.OperatingSystem.IsWindows() && CommandExtensions.IsToolbox()
        ? ((TemplateString)fqHostPath).Rendered.ToMsysPath()
        : ((TemplateString)fqHostPath).Rendered;

            _config.CreateParams.Volumes =
                _config.CreateParams.Volumes.ArrayAdd($"{hp}:{fqContainerPath}:{access.ToDocker()}");
            return(this);
        }
        public ContainerBuilder Mount(string fqHostPath, string fqContainerPath, MountType access)
        {
            var hp = Environment.OSVersion.IsWindows()
              ? ((TemplateString)fqHostPath).Rendered.ToMsysPath()
              : ((TemplateString)fqHostPath).Rendered;

            _config.CreateParams.Volumes =
                _config.CreateParams.Volumes.ArrayAdd($"{hp}:{fqContainerPath}:{access.ToDocker()}");
            return(this);
        }
Exemple #3
0
 public ContainerBuilder MountVolume(IVolumeService volume, string fqContainerPath, MountType access)
 {
     _config.CreateParams.Volumes =
         _config.CreateParams.Volumes.ArrayAdd($"{volume.Name}:{fqContainerPath.EscapePath()}:{access.ToDocker()}");
     return(this);
 }
Exemple #4
0
 public ContainerBuilder MountVolume(string name, string fqContainerPath, MountType access)
 {
     _config.CreateParams.Volumes =
         _config.CreateParams.Volumes.ArrayAdd($"{name}:{fqContainerPath}:{access.ToDocker()}");
     return(this);
 }
    public ContainerBuilder Mount(string fqHostPath, string fqContainerPath, MountType access)
    {
      var hp = FdOs.IsWindows() && CommandExtensions.IsToolbox()
        ? ((TemplateString) fqHostPath).Rendered.ToMsysPath()
        : ((TemplateString) fqHostPath).Rendered;

      _config.CreateParams.Volumes =
        _config.CreateParams.Volumes.ArrayAdd($"{hp.EscapePath()}:{fqContainerPath.EscapePath()}:{access.ToDocker()}");
      return this;
    }