From 085c6575cc0dddaa986ebd3757f84432862479f7 Mon Sep 17 00:00:00 2001 From: Aaron Yarborough Date: Sat, 17 Dec 2022 12:40:16 +0000 Subject: [PATCH] Add --network="host" flag explanation/example I ran into DNS issues within my container, and managed to resolve them by using the host's network configuration within my Docker container. Updating Troubleshooting.md to point others with the same issue in the right direction :) --- Troubleshooting.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Troubleshooting.md b/Troubleshooting.md index 75552b8..2b50807 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -14,3 +14,11 @@ Then you can test with these commands for example: curl https://google.com ping google.com ``` + +If running a ping results in a DNS-related error, try configuring your container to run using the host's network. To do this, run the `docker run` command with the `--network="host"` flag. For example: + +``` +docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma --network="host" louislam/uptime-kuma:1 +``` + +More information here: https://docs.docker.com/engine/reference/run/#network-host