Skip to content

Commit

Permalink
fix: add to exposed ports
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe committed Sep 13, 2023
1 parent bac9007 commit 542fb3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/run-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export const runSimple = async (opts: RunSimpleOptions) => {
const tcpContainerPort = containerPort.match(/tcp/)
? containerPort
: `${containerPort}/tcp`;
const nextExposedPorts = dockerodeConfig.ExposedPorts || {};
dockerodeConfig.ExposedPorts = nextExposedPorts;
nextExposedPorts[tcpContainerPort] = {};
dockerodeConfig.HostConfig!.PortBindings![tcpContainerPort] = [
{ HostPort: hostPort },
];
Expand Down

0 comments on commit 542fb3e

Please sign in to comment.