Running Cosmos DB Emulator in a docker container. UI completely unresponsive. - docker

I am trying to run Cosmos DB emulator in a docker container. My OS is Windows 10.
I followed all the steps as explained by Microsoft here
Eventually, after importing the certificate the Enulator generates etc. I do manage to have a container running, but the UI looks empty (see below):
My understanding is that the UI should look like this instead:
This second UI is the one I can see running the emulator directly on my machine (no docker container involved)
Notice how the UI in the docker container says "Document DB", while the one running on my machine says "Cosmos DB". Not to mention the different layout (and the fact that the second one actually works)
What puzzles me is that I am certain this is the same installer we are looking at here. I know this because, after having this issue with the official Microsoft image, we build our own docker image using the same installer that put Cosmos DB Emulator on our machines and when we run it... same result.
To be clear - those 2 UIs are the result of the same installer, running in docker container and running on a windows 10 machine.
Has anyone else encountered the same issue and if so, have you found a way to fix this issue?
All help highly appreciated

Related

Cannot pull the project from Bitbucket (the project is with IP restrictions) while using Docker with WSL2 Ubuntu-20.04 Distro

I've a Symfony project that I am running on my PC with Symfony serve.
This project is on Bitbucket that has IP restrictions, I can only work from home and nowhere else for security reasons, and all works just fine :).
I wanted to create a Docker image so that I can easily change my machine and be able to deploy it elsewhere.
So I created a Docker image and did the necesseray configurations and all seems good, I can open the project and work the same way as before. The Docker has the default WSL (WSL1) and I've noticed that the application isn't running as fast as usual (outside the Docker, to load a page it would take 3 seconds, while with Docker it takes at least 30 seconds).
I did some research and found out that I could use the WSL2 with DOCKER which provides better performance than the legacy Hyper-V Backend and Enabled integration for the distro UBUNTU-20.4. The problem using the WSL2 is that I am no longer able to pull my project in the WSL2 (from the Ubuntu-20.0) because of the IP restrictions.
It is really strange that I cannot find any configuration for this and I have no idea what should I do to change it. If I pull the project outside the WLS2 distro it works, with the default WSL it works also but not with the WSL2.
I removed the IP restrcitions and the Docker image worked fine, I have the same speed as If I was outside the Docker. The only problem is that I cannot use the IP restrcitoins for this !
Does anyone know how to fix this ? I haven't been able to find any documentation for this issue.
I am using Windows 10 and the Docker version : 4.5.1 (74721)
Thanks a lot for any information.

How to get started development inside docker container in windows operating system

I am a developer who is using Ubuntu 20.04 LTS regularly for my development. I never install any packages like, node, PHP, python in the OS and make use of docker for the purpose. VS Code is the editor I use, and the extension of the remote container will help me to develop & debug inside the docker container.
Right now, I am in the process of moving the development to a windows environment and I wanted to follow a similar workflow there too. Unfortunately, I am facing few issues like "file changes are not getting detected" (when npm serve in angular and react projects).
https://github.com/microsoft/WSL/issues/4739
https://www.reddit.com/r/bashonubuntuonwindows/comments/c48yej/wsl_2_react_not_reloading_with_file_changes/
I have tried different methods to solve the issue like
use wsl2 and then docker inside that and then serve from the container
use just docker and serve the code from inside the container
Regardless of the methods, the file changes are not getting detected inside the docker.
Trust me I have gone through many bizarre words like inotify, increasing the watchers, etc... Nothing helped.
Is there a developer out there following a similar practice in a Windows environment? (docker + windows)
Any help is highly appreciated.
I suggest moving the files to the wsl2 file system and not the windows.
Wsl2 'sees' the windows file system from inside a mount image /mnt/c .
Move out of it, like at ~ (cd ~) and i think your files will be normally watched .

No live output from containers running on Docker Desktop with WSL2

I'm developing an python-django app running in docker containers (django, celery, postgres, redist...etc). It runs on Windows 10 with WSL2-Debian & Docker Desktop.
During my work I need to observe the consoles of all those containers, so I can monitor apps behavior, like when you run docker-compose up so you got all of them live.
When you click on the container within windowed Docker Desktop app you can see the container's console output, but not actual - it looks like it works until some point of time and there are no updates of the consoles output.
I remember it was working live just prior to a two or three Docker Desktop updates, and I'm sure it was real time there, but not now.
Did I change a setting or Docker Desktop was bugged?
PS. When I start my containers with docker-compose up (without -d) I can observe live logs on my shell console, but not in Docker Desktop anymore.
Any help how to restore Docker Desktop live console view?
The Docker Desktop 3.4 (released June 9th, yesterday) is supposed to have resolved docker/for-win issue 11251.
I don't see the error after upgrading (with the normal docker-compose, not the beta docker-compose v2).
However, as commented by the OP twk and in issue 11251:
the live log is somehow broken - extra newline is added after every new line, but historical log entries (Eg. when you switch to/from another container) are displayed without newlines between entries (which is OK).
Update June 29th from Mathieu Champlon
Sorry it took a while but we now have an internal build that should fix it, if you wanted to give it a try:
win/stable/amd64/66242/Docker Desktop Installer.exe
Update Aug. 2021: Issue 11251 just closed with:
Docker Desktop 3.6.0 has been released containing a fix for this issue.
It's a bug in Docker Desktop v3.3.3
GitHub issue: https://github.com/docker/for-win/issues/11251 as pointed by #Drarig29

Disable Docker in Visual Studio

I have a Visual Studio Solution that I've been working with. This solution has a console app in it. Notably, I've been running Windows within a Bootcamp partition on my MacBook Pro.
A developer on my team wanted to use Docker. I agreed, thinking it wouldn't impact the console app itself. However, I can no longer compile the console app since Docker has been added. When I attempt to compile the solution, I see:
Visual Studio Container Tools requires Docker CE for Windows. To get it, see https://go.microsoft.com/fwlink/?linkid=847268
For more info, please see: http://aka.ms/DockerToolsTroubleshooting
Here's the problem, since I'm running Windows via a Bootcamp Partition, I can't run Docker (from my understanding). Is there a way to disable Docker just for my myself? If so, how? I don't want to undo what the other dev has done. However, I can't setup a brand new environment at this time.
My need is similar: disable Docker completely, but without uninstalling it.
So, this may help. But
My use case is different: I want to as nimbly as possible switch between VMWare and Docker.
My environment is different: I have a non-macbook PC and I'm only running Windows.
So YMMV.
This worked for my use case:
In the services control panel, disable the Docker for Windows Service or set it to manual start.
On the task manager startup tab, disable Docker for Windows.
For my use case only, there additional changes for VMWare. Disable DeviceGuard and CredentialsGuard per article at https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage.
Hope this helps for you.

Docker-for-selenium on Windows

Currently selenium HQ/docker-for-selenium is available for Linux os.
Here they are trying to implement selenium grid using docker, on Linux.
My main aim is achieving the same in windows. I am unaware what challenges I will face here.
So creating this thread to discuss the challenge while implementation.
For windows to support the IE in docker we need to understand two things.
1)Windows do not provide GUI capability inside the docker containers like XVBF in Linux.
2) No headless IE
Feel Free to explore this project in order to understand how they are enabling GUI in Linux containers.
Link to the project: https://github.com/SeleniumHQ/docker-selenium
UPDATES:
Still there is no official approach to run IE/EDGE inside docker as
"No Windows docker images have GUI, so we cannot test IE11, EDGE."
But,We can install virtual-box and make this happen.
This approach adds extra layer of virtualization[Nesting of virtualization] on the top of docker to make the IE/Edge execution happen and I think in near future it may leads to to performance issue for heavy testing.
If Selenium testing is what you are looking for and don't have heavy load , you can give a try to the approach mentioned in the link.
Youtube - Selenium Windows containers in Docker under Linux
Github - Windows Images
Blogpost - selenium-on-windows-docker-revolution

Resources