test: update docker config for windows support (#2721
There is legacy support for PortBindings and Binds at the root level of the config. Currently (including Windows) these reside under the HostConfig. ExposedPorts is now used to identify the externally available ports. Signed-off-by: Chris. Webster <chris@webstech.net>
This commit is contained in:
@@ -23,7 +23,10 @@ export async function start() {
|
||||
container = await docker.createContainer({
|
||||
Tty: true,
|
||||
Image: IMAGE,
|
||||
PortBindings: {[`${SERVER_PORT}/tcp`]: [{HostPort: `${HOST_PORT}`}]},
|
||||
HostConfig: {
|
||||
PortBindings: {[`${SERVER_PORT}/tcp`]: [{HostPort: `${HOST_PORT}`}]}
|
||||
},
|
||||
ExposedPorts: {[`${SERVER_PORT}/tcp`]: {}}
|
||||
});
|
||||
await container.start();
|
||||
|
||||
|
||||
@@ -19,7 +19,10 @@ export async function start() {
|
||||
container = await docker.createContainer({
|
||||
Tty: true,
|
||||
Image: IMAGE,
|
||||
PortBindings: {[`${MOCK_SERVER_PORT}/tcp`]: [{HostPort: `${MOCK_SERVER_PORT}`}]},
|
||||
HostConfig: {
|
||||
PortBindings: {[`${MOCK_SERVER_PORT}/tcp`]: [{HostPort: `${MOCK_SERVER_PORT}`}]}
|
||||
},
|
||||
ExposedPorts: {[`${MOCK_SERVER_PORT}/tcp`]: {}}
|
||||
});
|
||||
await container.start();
|
||||
|
||||
|
||||
@@ -25,8 +25,11 @@ export async function start() {
|
||||
container = await docker.createContainer({
|
||||
Tty: true,
|
||||
Image: IMAGE,
|
||||
PortBindings: {[`${REGISTRY_PORT}/tcp`]: [{HostPort: `${REGISTRY_PORT}`}]},
|
||||
Binds: [`${path.join(__dirname, 'config.yaml')}:/verdaccio/conf/config.yaml`],
|
||||
HostConfig: {
|
||||
PortBindings: {[`${REGISTRY_PORT}/tcp`]: [{HostPort: `${REGISTRY_PORT}`}]},
|
||||
Binds: [`${path.join(__dirname, 'config.yaml')}:/verdaccio/conf/config.yaml`],
|
||||
},
|
||||
ExposedPorts: {[`${REGISTRY_PORT}/tcp`]: {}}
|
||||
});
|
||||
|
||||
await container.start();
|
||||
|
||||
Reference in New Issue
Block a user