Cannot control port exposure via Docker Remote API from node

I have been struggling for a very long time, literally weeks, to get Docker to open up ports via the Remote API.

Although I have raised github issues against Dockerode and Docker, they have all received no comment.

For example, I have a minimal example of the problem at

Can anyone guide me to the right resources which would document the proper invocation via the Remote API? Dockerode is apparently the recommended library for accessing docker from node according to so I don’t know how else to make progress.

Note, Docker github issue closed with error identified in ExposedPort specification.