I am trying to created my own docker image.
In my docker file I used official docker dind image
I install everything else I need inside Dockerfile then create container using that dockerfile and start it.
I shell into it using docker exec -it however when I try to run docker ps or any other command I receive the following error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Should docker already be started if I used dind image? Or I am not understanding this properly.
My CMD to start container is
CMD ["/usr/sbin/sshd", “-D”, “-e”]
because I also want to start ssh server.
How can I start both ssh server and docker so that docker commands can be used inside container?