public void EnsureLinuxDaemonShallWork()
        {
            _docker.LinuxDaemon(_certificates);
            var mode = _docker.Version(_certificates);

            Assert.AreEqual("linux", mode.Data.ServerOs);
        }
Exemple #2
0
 /// <summary>
 /// Sets the docker daemon to linux if on windows system.
 /// </summary>
 /// <param name="host">The uri to host, may be null for default.</param>
 /// <param name="certificates">The certificates to communicate, many be null.</param>
 public static void LinuxMode(this DockerUri host, ICertificatePaths certificates = null)
 {
     if (OperatingSystem.IsWindows())
     {
         host.LinuxDaemon(certificates);
     }
 }
Exemple #3
0
        private bool SwitchToScope(EngineScopeType scope)
        {
            if (scope == EngineScopeType.Linux)
            {
                var result = _host.LinuxDaemon(_certificates);
                return(null != result && result.Success);
            }

            var res = _host.WindowsDaemon(_certificates);

            return(null != res && res.Success);
        }