question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tye Run with --docker does not warn about required image

See original GitHub issue

Describe the bug

If tye run is executed with –docker flag on a machine without mandatory .NET Core Image mcr.microsoft.com/dotnet/core/sdk:3.1-buster tye is not working but user does not see any information message to pull the mandatory image.

To Reproduce

Execute tye run --docker on a machine without mcr.microsoft.com/dotnet/core/sdk:3.1-buster docker image.

Resolution

Add console log message to show that mandatory image is required or a confirm message to allow pull directly from tye process.

Further technical details

❯ tye run  --docker
[19:22:55 INF] Executing application from E:\code\Tye-Samples\tye.yaml
[19:22:55 INF] Dashboard running on http://127.0.0.1:8000
[19:22:55 INF] Publishing project E:\code\Tye-Samples\FrontEnd\FrontEnd.csproj
[19:22:55 INF] Publishing project E:\code\Tye-Samples\Api\Api.csproj
[19:22:57 INF] Running docker command run -d -w /app -v E:\code\Tye-Samples\Api:/app -v C:\Users\unai\AppData\Roaming\Microsoft\UserSecrets:/root/.microsoft/usersecrets:ro  -e DOTNET_ENVIRONMENT=Development -e DOTNET_LOGGING__CONSOLE__DISABLECOLORS=true -e ASPNETCORE_URLS=https://*:443;http://*:80 -e HTTPS_PORT=4023 -e PORT=443;80 -e
SERVICE__FRONTEND__PROTOCOL=http -e FRONTEND_SERVICE_PROTOCOL=http -e SERVICE__FRONTEND__PORT=4022 -e FRONTEND_SERVICE_PORT=4022 -e SERVICE__FRONTEND__HOST=host.docker.internal -e FRONTEND_SERVICE_HOST=host.docker.internal -e SERVICE__API__PROTOCOL=http -e API_SERVICE_PROTOCOL=http -e SERVICE__API__PORT=4024 -e API_SERVICE_PORT=4024 -e SERVICE__API__HOST=host.docker.internal -e API_SERVICE_HOST=host.docker.internal -e APP_INSTANCE=api_fcd09330-e  -p 4023:443 -p 4024:80 --name api_fcd09330-e --restart=unless-stopped mcr.microsoft.com/dotnet/core/sdk:3.1-buster dotnet /app/bin/Debug/netcoreapp3.1/publish/Api.dll
[19:22:57 INF] Running docker command run -d -w /app -v E:\code\Tye-Samples\FrontEnd:/app -v C:\Users\unai\AppData\Roaming\Microsoft\UserSecrets:/root/.microsoft/usersecrets:ro  -e DOTNET_ENVIRONMENT=Development -e DOTNET_LOGGING__CONSOLE__DISABLECOLORS=true -e ASPNETCORE_URLS=https://*:443;http://*:80 -e HTTPS_PORT=4021 -e PORT=443;80 -e SERVICE__FRONTEND__PROTOCOL=http -e FRONTEND_SERVICE_PROTOCOL=http -e SERVICE__FRONTEND__PORT=4022 -e FRONTEND_SERVICE_PORT=4022 -e SERVICE__FRONTEND__HOST=host.docker.internal -e FRONTEND_SERVICE_HOST=host.docker.internal -e SERVICE__API__PROTOCOL=http -e API_SERVICE_PROTOCOL=http -e SERVICE__API__PORT=4024 -e API_SERVICE_PORT=4024 -e SERVICE__API__HOST=host.docker.internal -e API_SERVICE_HOST=host.docker.internal -e APP_INSTANCE=frontend_38af6b2c-0  -p 4021:443 -p 4022:80 --name frontend_38af6b2c-0 --restart=unless-stopped mcr.microsoft.com/dotnet/core/sdk:3.1-buster dotnet /app/bin/Debug/netcoreapp3.1/publish/FrontEnd.dll
[19:22:58 INF] Running container api_fcd09330-e with ID 3d90fef594d5
[19:22:58 INF] Collecting docker logs for api_fcd09330-e.
[19:22:58 INF] Running container frontend_38af6b2c-0 with ID f457fbe2f4bc
[19:22:58 INF] Collecting docker logs for frontend_38af6b2c-0.
[19:22:58 INF] docker logs collection for api_fcd09330-e complete with exit code 0
[19:22:58 INF] Stopping container api_fcd09330-e with ID 3d90fef594d5
[19:22:58 INF] docker logs collection for frontend_38af6b2c-0 complete with exit code 0
[19:22:58 INF] Stopping container frontend_38af6b2c-0 with ID f457fbe2f4bc
[19:22:58 INF] Stopped container api_fcd09330-e with ID 3d90fef594d5 exited with 0
[19:22:59 INF] Stopped container frontend_38af6b2c-0 with ID f457fbe2f4bc exited with 0
[19:22:59 INF] Removed container api_fcd09330-e with ID 3d90fef594d5 exited with 0
[19:22:59 INF] Removed container frontend_38af6b2c-0 with ID f457fbe2f4bc exited with 0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rynowakcommented, Mar 26, 2020

@unaizorrilla - I’m not seeing this fail, it just takes a really long time to pull and start. It looks like docker is pulling in the background without any UX to explain it.

We should still improve this we should probably pull all images before running anything. Then you know why you’re waiting.

dotnet publish "/Users/ryan/github.com/dotnet/tye/samples/single-project/test-project/test-project.csproj" --framework netcoreapp3.1 /nologo
Restore completed in 20.29 ms for /Users/ryan/github.com/dotnet/tye/samples/single-project/test-project/test-project.csproj. test-project -> /Users/ryan/github.com/dotnet/tye/samples/single-project/test-project/bin/Debug/netcoreapp3.1/test-project.dll test-project -> /Users/ryan/github.com/dotnet/tye/samples/single-project/test-project/bin/Debug/netcoreapp3.1/publish/
[test-project_f5cc36c5-2]: run -d -w /app -v /Users/ryan/github.com/dotnet/tye/samples/single-project/test-project/bin/Debug/netcoreapp3.1/publish/:/app -v /Users/ryan/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro -e DOTNET_ENVIRONMENT=Development -e DOTNET_LOGGING__CONSOLE__DISABLECOLORS=true -e ASPNETCORE_URLS=https://*:443;http://*:80 -e HTTPS_PORT=50410 -e PORT=443;80 -e SERVICE__TEST-PROJECT__PROTOCOL=http -e TEST-PROJECT_SERVICE_PROTOCOL=http -e SERVICE__TEST-PROJECT__PORT=50411 -e TEST-PROJECT_SERVICE_PORT=50411 -e SERVICE__TEST-PROJECT__HOST=host.docker.internal -e TEST-PROJECT_SERVICE_HOST=host.docker.internal -e APP_INSTANCE=test-project_f5cc36c5-2 -p 50410:443 -p 50411:80 --name test-project_f5cc36c5-2 --restart=unless-stopped mcr.microsoft.com/dotnet/core/sdk:3.1-buster dotnet test-project.dll

---- ABOUT 45 seconds pass ----

[test-project_f5cc36c5-2]: d717b33c86da7d3c43a5fff5c5d4b43b25213e23c5662348708836760d05cd9b
[test-project_f5cc36c5-2]: info: Microsoft.Hosting.Lifetime[0]
[test-project_f5cc36c5-2]: Now listening on: https://[::]:443
[test-project_f5cc36c5-2]: info: Microsoft.Hosting.Lifetime[0]
[test-project_f5cc36c5-2]: Now listening on: http://[::]:80
[test-project_f5cc36c5-2]: info: Microsoft.Hosting.Lifetime[0]
[test-project_f5cc36c5-2]: Application started. Press Ctrl+C to shut down.
[test-project_f5cc36c5-2]: info: Microsoft.Hosting.Lifetime[0]
[test-project_f5cc36c5-2]: Hosting environment: Development
[test-project_f5cc36c5-2]: info: Microsoft.Hosting.Lifetime[0]
[test-project_f5cc36c5-2]: Content root path: /app
1reaction
rynowakcommented, Mar 25, 2020

Wow that seems pretty bad. I wonder what we’re doing that specifically avoids pulling the base image.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Docker Engine installation
Troubleshoot Docker Engine installation. This page contains instructions for troubleshooting and diagnosing the Docker Engine installation.
Read more >
Dockerfile does not receive environment variables
While running the docker file, it will give you warning because docker compose has no idea from where to pick the values for...
Read more >
Top 20 Dockerfile best practices for security
Learn how to prevent security issues and optimize containerized applications by applying 20 Dockerfile best practices in your image ...
Read more >
Docker executor | GitLab
Docker · Run CI/CD jobs in Docker containers · Use Docker to build Docker images · Authenticate with registry · Docker Layer Caching....
Read more >
WARNING: The requested image's platform (linux/amd64) ...
This warning message indicates that there is a platform mismatch between the requested image and the host platform. The requested image was likely...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found