diff --git a/docker-compose.yml b/docker-compose.yml index 1508496..f52c403 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,3 +93,4 @@ networks: internal: players: name: linux-odyssey-players + internal: true diff --git a/server/src/containers/docker.js b/server/src/containers/docker.js index be652f5..551b1fc 100644 --- a/server/src/containers/docker.js +++ b/server/src/containers/docker.js @@ -12,6 +12,7 @@ const containerOptions = { OpenStdin: true, StdinOnce: false, HostConfig: { + NetworkMode: config.dockerNetwork, Binds: !config.isProduction && config.hostPwd ? [ @@ -22,14 +23,13 @@ const containerOptions = { }, } -const network = engine.getNetwork(config.dockerNetwork) +// const network = engine.getNetwork(config.dockerNetwork) export async function createContainer(name) { const container = await engine.createContainer({ ...containerOptions, name, }) - await network.connect({ Container: container.id }) return container }