Skip to content

Commit

Permalink
only use bridge network
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhorner committed Dec 2, 2024
1 parent 0568f6f commit c9826ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
dragonify:
build: .
image: ghcr.io/tjhorner/dragonify:main
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ function getDnsName(container: Docker.ContainerInfo) {
}

async function connectContainerToAppsNetwork(docker: Docker, container: Docker.ContainerInfo) {
if ([ "default", "bridge" ].includes(container.HostConfig.NetworkMode)) {
console.log(`Container ${container.Id} is not using bridge network; not connecting`)
return
}

const network = docker.getNetwork(NETWORK_NAME)
const dnsName = getDnsName(container)

Expand Down

0 comments on commit c9826ca

Please sign in to comment.