Docker Networking and ports

ok so you are saying if we want to run both one in the same container , we have to modify the base-image maually by ourself??? Can’t we install ssh services and some webserver like apache directly inside the container as we used to do in LXC…sorry i have used LXC alot so i am expecting docker somewhat similar like that…may be i am wrong about this…

so ok after adding the abov config, will i be able to expose the ports simultaneously for both ssh and web servers like:

For ssh:
sudo docker run -it -d --name TEST -p 2927:22 centos

For webservice:

sudo docker run -it -d --name TEST -p 8080:80 centos

Assuming that name of container is TEST and the base-image is centos.

so it’s ok for the first command i.e. for ssh
as soon as i enter the second command for webserver it will popup the TEST container has been already configured… so how can i expose the port 22 and 8080 for that container named TEST simultaneously…that’s what i am facing problem…did you get my question now?