Docker Community Forums

Share and learn in the Docker community.

Multiple node express servers, one container, only one server exposed

Is it possible to have one Docker container which contains two node express servers, one which is exposed to the “public” and one which is “private” but the “private” can be called by the “public” server?

I have a Postgres database which is front by a node express server. Call this the “private” server.

I am not in control of the “private” server. It expects some values to be in certain HTTP request headers so I need to write a facade (“public” server) in-front of the “private” server to do some translation.

You can run multiple containers on one server, and it is not restricted to the number of CPUs. Your command creates and starts exactly 1 container that has access to at most 16 CPUs (and in the 2nd example only precisely CPUs 0-15). What you want to do is execute your command N times for N containers.