docker-compose network_mode: "host" doesn't seem to work

I try to build containers with a docker-compose.yml file :

version: '2'  services:      geonode:         build:              context: .         hostname: geonode         container_name: geonode         ports:             - 8000:8000         volumes:             - .:/geonode/         entrypoint:             - /usr/bin/python         command: runserver         network_mode: host 

In my Dockerfile I run apt-get update after FROM ubuntu:14.04 but it fails : Could not resolve ''

I tried docker run -i -t --net=host ubuntu:14.04 /bin/bash and then run apt-get update and it works. So it seems to me that the network_mode in docker-compose and the --net=host with docker run don't work the same way.

Does somebody has an explanation?


Category: docker Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.201 (s). 12 q(s)