I have a program that simply pull a docker image through docker API and run it as a container, I can run it smoothly but my question is, can I dockerize this program?
A few issues I come to is:
- how do I attach the unix socket
/var/run/docker.sock
inside the first container? - how do I connect it to the internet so it can pull the image?
- how do I bind the port of the running container inside container to the host port?
Lastly, is it a good idea at all to have a structure like this? if not then what's the alternative?