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: manage.py runserver 0.0.0.0:8000         network_mode: host 

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

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?

Replay

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

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

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