Skip to content

Commit

Permalink
Disconnect proxy from bridge network
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurre Stender committed Oct 22, 2021
1 parent 8f46f3b commit 97c0909
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export class ProxyBuilder {
jobId,
name,
externalNetwork,
internalNetwork
internalNetwork,
internalNetworkName
)

await ContainerService.storeInput(
Expand Down Expand Up @@ -179,7 +180,8 @@ export class ProxyBuilder {
jobId: number,
containerName: string,
externalNetwork: Network,
internalNetwork: Network
internalNetwork: Network,
internalNetworkName: string
): Promise<Container> {
const container = await this.docker.createContainer({
Image: this.proxyImage,
Expand All @@ -194,12 +196,11 @@ export class ProxyBuilder {
],

HostConfig: {
NetworkMode: 'bridge'
NetworkMode: internalNetworkName
}
})

await externalNetwork.connect({Container: container.id})
await internalNetwork.connect({Container: container.id})

core.info(`Created proxy container: ${container.id}`)
return container
Expand Down

0 comments on commit 97c0909

Please sign in to comment.