This documents describes some issues that may happen when deploying to docker, its causes and its solutions.
Cause: Docker build command fails because Docker is running Linux Containers.
Solution: Open Docker for Windows and switch to Windows Containers
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:52399->[::1]:53: read: connection refused
Solution: Disconnect from wifi, restart Docker (*), and connect to WiFi.
(*) in some case, just restarting Docker solved the issue
ERROR: for cgxmodelstrunkdockerexecutenetcore_web Cannot create container for service web: Drive has not been shared
ERROR: for web Cannot create container for service web: Drive has not been shared
ERROR: Encountered errors while bringing up the project.
Cause: This error happens on Linux containers when the volume of the physical drive is not shared.
Solution: Go to Docker for Windows -> Shared Drives and mark the drive you need (eg C:)
This happens in some cases after windows is started
Solution: Restart Docker Engine
To restart Docker Engine go to Settings(right click in tray icon) and Select "Restart Docker"
Or error: The images used to run this environment are Linux. Please switch your Docker client settings to Linux containers.
Solution: Switch ;)
- Docker Tip #31: How to Remove Dangling Docker Images
- Docker Tip #32: Automatically Clean up after Docker Daily