Ejemplo n.º 1
0
        public void ContainerIsolationGeneratesRuntimeOption(ContainerIsolationTechnology isolationTechnology, string expectedIsolationParameter)
        {
            var prms = new ContainerCreateParams {
                Isolation = isolationTechnology
            };
            var opts = prms.ToString();

            Assert.IsTrue(opts.Contains($" --isolation {expectedIsolationParameter}"));
        }
Ejemplo n.º 2
0
        public static string ToDocker(this ContainerIsolationTechnology isolation)
        {
            switch (isolation)
            {
            case ContainerIsolationTechnology.Default:
                return("default");

            case ContainerIsolationTechnology.Hyperv:
                return("hyperv");

            case ContainerIsolationTechnology.Process:
                return("process");

            default:
                return(null);
            }
        }
Ejemplo n.º 3
0
 public ImageBuilder WithIsolation(ContainerIsolationTechnology isolation)
 {
     _config.Params.Isolation = isolation;
     return(this);
 }