예제 #1
0
 public static async Task CopyToContainer(CopyContext context, IImageSettings settings)
 {
     using (var archiver = new TarArchiver(context.Source))
     {
         await _client.Containers.ExtractArchiveToContainerAsync(
             settings.ContainerId,
             new ContainerPathStatParameters
         {
             AllowOverwriteDirWithFile = true,
             Path = context.DestinationFolder.Replace("\\", "/")
         }, archiver.Stream);
     }
 }
예제 #2
0
 /// <inheritdoc/>
 public async Task CopyToContainerAsync(CopyContext context, bool overrideTargetName = false)
 {
     using (var archiver = new TarArchiver(context, overrideTargetName))
     {
         await _client.Containers.ExtractArchiveToContainerAsync(
             Instance.Id,
             new ContainerPathStatParameters
         {
             AllowOverwriteDirWithFile = true,
             Path = context.DestinationFolder.Replace("\\", "/")
         }, archiver.Stream);
     }
 }