Browse Source

Don't consider it a fatal error when the container host is not accessible. (#1027)

For many use-cases there is no need to access the host.
philliphoff-arm64
Tom Deseyn 5 years ago
committed by GitHub
parent
commit
53591d170e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/Microsoft.Tye.Hosting/DockerRunner.cs

5
src/Microsoft.Tye.Hosting/DockerRunner.cs

@ -202,9 +202,10 @@ namespace Microsoft.Tye.Hosting
var hostname = application.ContainerEngine.ContainerHost;
if (hostname == null)
{
_logger.LogError("Configuration doesn't allow containers to access services on the host.");
_logger.LogWarning("Configuration doesn't allow containers to access services on the host.");
throw new CommandException("Configuration doesn't allow containers to access services on the host.");
// Set a value even though it won't be usable.
hostname = "host.docker.internal";
}
var dockerImage = docker.Image ?? service.Description.Name;

Loading…
Cancel
Save