Hi
I’ve installed Docker v17.03.0-ce on Ubuntu 16.04.
I have to start a stack on this server… When i do that, ports are not mapped.
debian.yml :
version: '3'
services:
debian:
image: debian
ports:
- "2222:2222"
command: /bin/bash -c "ping localhost"
$ docker stack deploy -c debian.yml test
$ netstat -paunt |grep 2222
If I start container with docker run, then ports are mapped.
$ docker run -itd -p “2222:2222” debian bash
$ netstat -paunt |grep 2222
tcp6 0 0 :::2222 :::* LISTEN 5569/docker-proxy
I’ve also tested docker stack on debian : port mapping works on Debian…
Does someone know why port mapping doesn’t seem to work on Ubuntu with docker stack?
Thank you