I am trying to create a docker container based on the busybox image and having some problem. The whole purpose of this container is that once we run it, it will run a SSH tunnel command and expose the port of the remote server to the local port of 5432. and for extra bonus, I like to install apache on that container as well. I downloaded the busybox image, tagged it as mycustomregistry/ssh-image and pushed it into the custom repository.
This is my Dockerfile:
CMD [“ssh -f firstname.lastname@example.org -L 5432:x.x.x.x:5432 -N”]
RUN apt-get -y update && apt-get install -y apache2
And this is my Makefile:
docker build -t mycustomregistry/ssh-image .
And then this is how I run it: docker run -i -t mycustomregistry/ssh-image
The problem is once I run it as mentioned above, I only get a —> / # and basically can’t even tell if I did everything correctly or not. Can someone please help me figure this out?
Thanks in advance