dotnet / dotnet/eShop

Standalone Remote Docker issue

Open
#906 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.9k
Forks
3.8k
Avg merge
1d 11h
Merged PRs (30d)
4

Description

The built-in feature of the Docker client is the ability to interact with remote Docker using ```DOCKER_HOST```

But src\eShop.AppHost\Program.cs configures services to listen only 127.0.0.1

As a result, aspire successfully downloads images and starts containers on remote docker by ```dotnet run```:
```
PS M:\eShop-SQL-Server\eShop\src\eShop.AppHost> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d1e9fb71112a ankane/pgvector:latest "docker-entrypoint.s…" 31 seconds ago Up 30 seconds 127.0.0.1:49158->5432/tcp postgres-fjctrgzs
526dee5fdf04 rabbitmq:3.13 "docker-entrypoint.s…" 31 seconds ago Up 31 seconds 4369/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 127.0.0.1:49157->5672/tcp eventbus-wkgvgadv
a5aabf8828b7 redis:7.4 "docker-entrypoint.s…" 31 seconds ago Up 31 seconds 127.0.0.1:49156->6379/tcp redis-tarxxvkr
PS M:\eShop-SQL-Server\eShop\src\eShop.AppHost>
```

But they listen only 127.0.0.1 on the docker host. As result, any comunication from eShop application is refuced

Method `.WithHostPort(12345, isExternal: true)` may solve the problem, but the port should be hardcoded and is not available in 8.0 version

1) Is there workaround for 8.0?
2) Is there a solution for 10.0 without a hardcoded port?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.