Unofficial Content

This documents describes some issues that may happen when deploying to docker, its causes and its solutions.


Image operating system "windows" cannot be used on this platform / You need to change your Docker Engine to work with Windows containers

Cause: Docker build command fails because Docker is running Linux Containers.

Solution: Open Docker for Windows and switch to Windows Containers

config-popup-win-linux-switch_20171127175534_1_png


Connection refused

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.

Source: https://forums.docker.com/t/cannot-connect-to-docker-registry-auth-servers/16630/11

(*) in some case, just restarting Docker solved the issue


Drive has not been shared

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:)

image_201783201124_1_png


Docker Engine could not be started

This happens in some cases after windows is started

Solution: Restart Docker Engine

DockerCouldNotStart

To restart Docker Engine go to Settings(right click in tray icon) and Select "Restart Docker"

DockerRestart


error: The images used to run this environment are Windows. Please switch your Docker client settings to Windows containers.

Or error: The images used to run this environment are Linux. Please switch your Docker client settings to Linux containers.

Solution: Switch ;)

DockerSwitchToWindows


Sharing two interesting tips from Docker Tips:

  1. Docker Tip #31: How to Remove Dangling Docker Images
  2. Docker Tip #32: Automatically Clean up after Docker Daily

 


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant