Connection issue from host machine to conan-repository in docker container

I’m using artifactory conan-repository to keep my binary files and this repository is running as a container in my machine.

I installed conan-client to my host machine and created a binary, uploaded it to my local artifactory and tested it via basic dependecy application. Everything is fine. Then I wanted to move my basic dependency application to another container. I started this new container with –net=”host” option so I was expecting to follow same path like I did in host machine. But apperantly I can’t connect conan-repo. I have net connection, I can ping container but can’t reach conan-repo.

I’m adding remote repository conan remote add my-conan-repo http://localhost:8081/artifactory/api/conan/conan

any suggestion to look at ?

Source: StackOverflow