Docker Windows Vs VM Ubuntu Docker - docker

I am fairly new and want to learn Docker and Containers, specifically web app architecture. My question is what path should I go to, if I just install Docker Desktop on Windows or just install a VM and run an ubuntu then the docker?
Thanks...

Related

Docker without docker dekstop. How to run Dockerfile

I want to run docker container on windows without docker desktop.
I dont know how it could work.
I installed Ubuntu on Windows (from Microsoft Store).
In Windows cmd i can write 'wsl' and then it brings me to Ubuntu cmd. In Ubuntu i installed Docker and its working.
Now I have project on Windows with Dockerfile. How can i run it ?
Because i have two systems Windows with my project and Linux with docker. What i have to do now to makes it works ?
Thanks
In your WSL navigate to your Dockerfile location. /mnt/c is the windows C: drive location inside the WSL. Build your Dockerfile with docker build. Run it with docker run. If the docker commands complain about the docker daemon not being reachable you need to start it with sudo service docker start.

How to run CLI on docker desktop on windows11

I am new to docker world. I have installed docker desktop for windows on my win11 machine.
When I run docker version. I get this below information.
Can someone please guide me on how I can get docker CLI working so that I can get an interactive window of the run-time containers.

Debug python code running in a docker compose on a SSH remote development machine

I run a docker-compose (python) application on a remote machine, which I can access via SSH for remote development with VS Code.
I'm running the docker compose application on a Ubuntu 22.04 LTS machine and develop from a Windows 10 notebook. The remote machine has docker desktop 4.11 installed, as well as the Docker Extension Pack for VSC.
When I open the folder on the remote machineand start the application, I can see the that the docker images are created and containers are running. But when I try to attach a Visual Studio Code to the running container I get the error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Is there a way to debug the code inside the docker containers?
Seems like the docker engine fo docker desktop is not found by the docker extension of VSC. Docker desktop for Linux is installs the docker engine in unix://home/<user/.docker/desktop/docker.sock and not under the standard docker engine path mentioned in the error messageunix://var/run/docker.sock. See Switch between Docker Desktop and Docker Engine
So my solution is to install the Docker Engine instead of Docker Desktop until a fix of VSC or the VSC Docker extension is available.
After attaching Visual Studio Code to the running container you can debug the application in the same way as on your do on your own machine.

What are the other alternatives of Docker Desktop to run a container on Window machine

I was using Docker desktop to run docker containers on my window 10 machine.
But now I have to uninstall the docker desktop due to the licensing.
What are the other alternatives to run containers in my window machines ?

Docker inside Windows guest virtual machine

I use Debian Jessie as a VirtualBox host.
I have a Windows 7 virtual machine guest, what I use for development purposes.
I want to install docker.
In order to install docker for Windows I need Boot2docker.exe.
Boot2docker itself is a VirtualBox virual machine.
It requires enable VT-x.
That doesn't seem to work.
VirtualBox error message:
VT-x is not available (VERR_VMX_NO_VMX)
E_FAIL (0x80004005)
Console
IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}
You want to run Docker client on your Windows development VM. Now you want to create a boot2docker linux VM inside the windows VM to run the docker deamon on. I think it's better to run the docker deamon on your Debian host system and let the docker client talk to the host system.
See
https://docs.docker.com/engine/docker-overview/#the-docker-client

Resources