The Question: 

Is it possible to have two containers running, from the same image, 
on the same host (linux) machine, but with ssh listening on two different ports,
so two (outside docker) editor sessions can talk to the two containers at the same time?
Maybe using a combination of --expose and the sshd -p flag?
I do not want to attach to ssh from an external machine (different from where the containers are running).

Should the image be built with an EXPOSE command (set to an env variable?),
or no expose command?

I know nothing about networking. 
I read several articles e.g. about the difference 
between "expose" and "publishing" and the terminology is beyond me.
Please tune the answer to a beginner (in terms of networking).

Background: 

1. I am using docker to encapsulate a programming language and its libraries in a reproducable way. This is particularly important for my work, which sometimes requires revisiting an old project and exactly reproducing the previous output before making changes.
2. Specifically, the container is run like this

`sudo docker run -p 7776:22 --rm -it -v ${PWD}:/work --ipc=host imagename`

Then inside the container

`/usr/sbin/sshd -D`

Then from outside *but on the same machine* I attach the code editor/IDE, which talks to the container through sshd somehow. (Followed a tutorial, it works fine)

3. I want to be able to have several sessions open on the same machine,
one of them running a long job, second one to do work on a different program, 
but using the same programming environment.