Deepomatic / dmake

DMake is a tool to manage micro-service based applications
MIT License
36 stars 3 forks source link

Support docker run --network=host #542

Open thomas-riccardi opened 2 years ago

thomas-riccardi commented 2 years ago

In some cases it's useful to have a container run with the host network (e.g. multiple dmake shell sessions talking to each other, at least one with --standalone)

thomas-riccardi commented 1 year ago

temporary workaround: manually patch dmake/utils/dmake_run_docker

modified   dmake/utils/dmake_run_docker
@@ -44,7 +44,7 @@ if [ ! -z "${TMP_DIR}" ]; then
     echo ${NAME} >> ${TMP_DIR}/containers_to_remove.txt
 fi

-DOCKER_RUN_ARGS=( )
+DOCKER_RUN_ARGS=( --network=host )

 # support some GPU modes using nvidia docker v2
 if [[ "${DMAKE_DOCKER_RUN_WITH_GPU}" == 'yes' ]]; then

WARNING: