Setting up docker container on remote windows server VM - docker

I'm currently trying to set up a Selenium Grid in a docker container which will be hosted on a remote Windows Virtual machine. I have installed docker and I seem to be able to create a container that will run Selenium. But I have no idea how to make Docker use my windows VM as the host.
I have an IP address for the VM, but I cannot find a command that will allow me to specify where I want my grid hosted. Does anyone how to do this in docker?
I am using
Windows 10
Docker Desktop for Windows 10
Mobaxterm to RDP into my Windows 10 VM
Git bash to run docker commands

Related

Pointing powershell to correct Docker

I am new to Docker and MiniKube.
On my Windows laptop I have installed Docker Desktop and MiniKube.
I created two nodes in MiniKube and they are up and running.
I have been using Powershell with images and containers with Docker Desktop with no issues.
Now I realize that Minikube is using it's own installation of Docker and I cannot see the containers created by MiniKube in Powershell.
How do I get Powershell to point to Docker used by MiniKube?
How do I reverse that change to work again with Docker Desktop?

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 ?

How to Run Jenkins in a Windows Docker Container on Windows 10?

I am trying to run Jenkins in a docker container on my Windows 10 box. I am using a Windows container, not a Linux container.
I tried to use this guide: https://jenkins.io/doc/book/installing/#on-windows
However the command to enter is for Linux containers, not Windows containers.
I can't seem to get Linux containers to work due to a known issue with them after the 1709 update (https://github.com/docker/for-win/issues/1221).
I tried "docker pull jenkins" however there's no amd64 version to pull.
Any ideas here? My only other thought is trying to figure out how to run Java from a windows container so I can use the Jenkins .war file instead?
Actually, I was able to run Jenkins Linux container on my Windows (Build 1709)
machine. However, this version of Windows and Docker (17.12.0) run Linux Containers on top of Hyper-V. So you need to enable Hyper-V before taking the following steps.
Right-click on the whale icon and click on Switch To Linux Containers
run docker pull jenkins/jenkins:lts in Powershell
run docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts in Powershell
Get The IP of your container and use your browser to open Jenkins Panel on port 8080.
Besides that, I found there are several Jenkins Windows Images. Such as:
https://www.assistanz.com/installing-jenkins-through-docker-file-for-windows-container/
https://asmagin.com/2017/05/02/jenkins-on-docker-for-net-projects/

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