Installing Active directory or Ldap server in windows container - docker

I'd like to test a product using Docker windows containers.
I need a container with Active directory or Ldap server.
Does anyone know how to accomplish that?
Thanks

Your question is not clear about whether you want the container to run on windows host or you want windows to run inside the container in which you want LDAP.
Regarding former, you can start OpenLDAP by following commands in a windows host machine with docker for-windows installed:
docker pull osixia/openldap
docker run --name my-openldap-container --detach osixia/openldap
The details on how to configure the OpenLDAP container is given here:
https://github.com/osixia/docker-openldap

Related

Install a package with Docker in Ubuntu

I want to install a package by docker, following instruction in: https://dynamic-fba.readthedocs.io/en/latest/installation.html#installing-from-source
I installed ubuntu and then Docker. But I don't understand what I need to do next. There it is said to type (docker run -it -v ${PWD}:/opt/examples davidtourigny/dfba python3 examples/example1.py). I excatly type it in ubuntu but I get this error:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
Using alternative method of dockerfile, I also get error. I don't know how to make use of make build, but used build instead following tutorials on the web.
It's my first time using Docker and I don't know what to do.
Any help is very appreciated.
The Docker application has two components, a back-end server, and a front-end cli. This way you can do cool stuff like control Docker remotely or have orchestration frameworks that manage multiple Docker nodes over the network like Kubernates.
For security, the Docker back-end server is not exposed on a normal TCP port but it uses a unix domain socket (Linux magic that makes a file act as a port) at unix:///var/run/docker.sock.
When you execute docker run -it ... the cli application will attempt to connect to the backend server, but it looks like the daemon/server is probably not running.
Try to check that daemon is running. If you are using systemd you can check with
systemctl status docker and start if is stopped with systemctl start docker finally it might be good to enable it to make sure it starts automatically on reboot, you can do that with systemctl enable docker
Make sure to start docker service (you can either go for systemctl start docker or reboot your computer).
Once this is done, it is likely that your user has no permissions to communicate with Docker without sudo. Docker has privileged access to your hardware and therefore giving a user the docker group is required for security reasons.
Run:
sudo usermod -aG docker $USER
groupadd docker
docker run hello-world
This will add you to docker group, reflect the changes inmediately and run a sample image from Docker.
If all was okay, the last command should tell you "Hello from Docker".

Rootless-ly Running Docker Daemon inside another Docker container

According to Docker official website: https://docs.docker.com/engine/security/rootless/ it's possible to run Docker Daemon rootless-ly (without root access, no --privileged flag).
However I'm convinced this would not work when running from inside a Docker container. There is no way of getting modprobe inside a Docker container without root access (--privileged). So it's not possible to install the Docker rootless script.
Supposedly there is an official image in Docker hub: docker:dind-rootless image here So I pulled the image and SSH'd into the container, however I'm getting the following error when running dockerd
INFO[2020-07-17T20:50:32.355617100Z] Starting up dockerd needs to be started with root. To see how to run dockerd in rootless mode with unprivileged user, see the documentation
Any suggestions on how to run Docker daemon rootlessly inside another Docker container? I know this is possible with root, but is there a way to do without? I can't get root access as I'm deploying to AWS fargate, which doesn't support privileged access at the container level.
It's been 2 years. There's an image for it now.
https://docs.docker.com/engine/security/rootless/#rootless-docker-in-docker

Unable to connect Docker Windows Container using VNC server

I have a problem connecting a windows container I wish to use for running automation scripts.
Host - Primary Operating System which is running HyperV and docker
(Access to UI)
Target - container hosted on Host using docker (No access to UI)
Following are the details of the environment am working on:
Container image : mcr.microsoft.com/windows/servercore
Installed components include: Maven / Java / VNCServer.
Docker container is running on docker using HyperV on the same machine I wish to connect this container to.
Host Operating System is windows 10 pro.
I installed all softwares in the Target by copying them first and performing a silent installation.
I tried the following solutions but none have been possibly working out.
Started container with command : docker run -itd -p 5920:5920 --name containername imagename
Started container with command : docker start containername
Got access to cmd of Target node : docker exec -it containername cmd
Ran tasklist to ensure : vnserver was running
On Host supplied the IP address of the Target along with port numbers 5920 which results in errors stating timed out connection.
I need to be able to see the UI of the Target system and be able to
control it on the host.
Tried Commands from Teamviewer -id -p but it itself launches the UI which is not available on the Target system.
Is there a way I can get this working?
Please let me know if you need any additional information.

Unable to access Jenkins container outside of host network

I am stuck in a step. I am using an ubuntu vm which is in Azure cloud through terminal; don't have UI access. There I have installed docker and pulled the jenkins image. I have mapped this container from my host machine by running following command - docker run -p 8080:8080 jenkins to access this jenkins from my MAC using Ubuntu IP address:8080, however I am getting the This site cannot be reached. So do I am following or missed any steps to mapped the container outside of docker host machine? Please help!

docker create service unavailable

I am behind a corporate firewall, running on Windows 7. I believe that I have gotten past any proxy issues (at least as far as accessing the container for which I'm trying to install.)
At this point I'm trying to execute docker's run command which 'acquires' the tensorflow package an installs it on my system.
$ docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow
C:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect:
Post https://192.168.99.100:2376/v1.23/containers/create: Service Unavailable.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
I'm new to docker, (obviously) but I see that the 192.168.99.100 default docker container exists and is running.
I do see documentation regarding the 'create' service endpoint. I'm at a dead end. Any help is appreciated.
-gene
when you type docker command docker client try to connect with your local docker service. And in linux world you need a superuser privileges to connect client and service.
I don`t run docker on windows, but may be you need run docker as Administrator. like linux
sudo docker run ...

Resources