forked from microsoft/component-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIDockerService.cs
23 lines (17 loc) · 916 Bytes
/
IDockerService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.ComponentDetection.Contracts.BcdeModels;
namespace Microsoft.ComponentDetection.Contracts
{
public interface IDockerService
{
Task<bool> CanRunLinuxContainersAsync(CancellationToken cancellationToken = default);
Task<bool> CanPingDockerAsync(CancellationToken cancellationToken = default);
Task<bool> ImageExistsLocallyAsync(string image, CancellationToken cancellationToken = default);
Task<bool> TryPullImageAsync(string image, CancellationToken cancellationToken = default);
Task<ContainerDetails> InspectImageAsync(string image, CancellationToken cancellationToken = default);
Task<(string stdout, string stderr)> CreateAndRunContainerAsync(string image, IList<string> command,
CancellationToken cancellationToken = default);
}
}