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'
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?