Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

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

Merged
merged 1 commit into from
May 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Microsoft.Tye.Hosting/DockerRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,10 @@ private void StartContainerAsync(Application application, Service service, Docke
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;
Expand Down