diff options
Diffstat (limited to 'cypress/dockerNode.ts')
-rw-r--r-- | cypress/dockerNode.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cypress/dockerNode.ts b/cypress/dockerNode.ts index 5da0ae96ad7..b65f164dc15 100644 --- a/cypress/dockerNode.ts +++ b/cypress/dockerNode.ts @@ -88,6 +88,12 @@ export const startNextcloud = async function(branch: string = getCurrentGitBranc Type: 'tmpfs', ReadOnly: false, }], + PortBindings: { + '80/tcp': [{ + HostIP: '0.0.0.0', + HostPort: '8083', + }], + }, }, Env: [ `BRANCH=${branch}`, @@ -242,11 +248,15 @@ export const getContainerIP = async function( while (ip === '' && tries < 10) { tries++ - await container.inspect(function(err, data) { + container.inspect(function(err, data) { if (err) { throw err } - ip = data?.NetworkSettings?.IPAddress || '' + if (data?.HostConfig.PortBindings?.['80/tcp']?.[0]?.HostPort) { + ip = `localhost:${data.HostConfig.PortBindings['80/tcp'][0].HostPort}` + } else { + ip = data?.NetworkSettings?.IPAddress || '' + } }) if (ip !== '') { |