This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
Hit localhost from a batect-spun container? :) #1461
Unanswered
adameichelkraut
asked this question in
Q&A
Replies: 1 comment
-
You should be able to use One thing to check: the target web server on your machine may need to be listening on all local addresses, not just the loopback address. (ie. check if it is listening on Similarly, I'm not sure if |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TLDR; I have a separate web server that might be running in localhost that I wish to hit with my batect-spun-up container! Anyone have any snippets for how to do this properly?
Tried sifting lightly through the discussions -- wondered if this was already answered. I also did some light googling on the topic at large within the Docker-verse and it seems folks have found luck by either setting the network to
host
and fiddling with setting someadditional_hosts
on the container to point the container to the host machine's network.I've tried using
--use-network=host
with batect, however I get:I've also tried adding something like this to the container's config:
However, I'm thinking that this above needs to be paired with the use network host.
Maybe I'm missing something in the docs? Look forward to chatting! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions