So I have 3 ports that should be exposed to the machine\'s interface. Is it possible to do this with a Docker container?
In your Dockerfile, you can use the verb EXPOSE to expose multiple ports.
e.g.
EXPOSE 3000 80 443 22
You then would like to build an new image based on above Dockerfile.
e.g.
docker build -t foo:tag .
Then you can use the -p to map host port with the container port, as defined in above EXPOSE of Dockerfile.
e.g.
docker run -p 3001:3000 -p 23:22
In case you would like to expose a range of continuous ports, you can run docker like this:
docker run -it -p 7100-7120:7100-7120/tcp