Hello,
I’m new to docker, and trying to learn the most of it.
I’m trying to deploy up to 4 Containers of the same application (FreeSWITCH in my case…OpenSource PBX/Switch for Telephony).
I was able to deploy the first one, and it’s working properly, this is the command i ran:
docker run --net=host --name freeswitch -p 8880:22 -p 5060:5060/tcp -p 5060:5060/udp -p 5080:5080/tcp -p 5080:5080/udp -p 8021:8021/tcp -p 7443:7443/tcp -p 60535-65535:60535-65535/udp /bin/bash -e SOUND_RATES=8000:16000 -e SOUND_TYPES=music:en-us-callie -v freeswitch-sounds:/usr/share/freeswitch/sounds -v /etc/freeswitch/:/etc/freeswitch safarov/freeswitch
And container is running accordingly:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bc601cd72345 safarov/freeswitch “/entrypoint.sh /bin…” 6 hours ago Up 5 minutes (healthy) freeswitch_pbx_1
When trying to run the second one i need, i’m getting an error, here’s my command and the output i get:
dadiaspe@srv-lx-containers-fs-01:~$ docker run --net=host --name freeswitch_pbx_2 -p 8881:22 -p 5061:5061/tcp -p 5061:5061/udp -p 5081:5081/tcp -p 5082:5082/udp -p 8022:8022/tcp -p 7444:7444/tcp -p 65536-70000:65536-70000/udp /bin/bash -e SOUND_RATES=8000:16000 -e SOUND_TYPES=music:en-us-callie -v freeswitch-sounds:/usr/share/freeswitch/sounds -v /etc/freeswitch_pbx_2/:/etc/freeswitch safarov/freeswitch
docker: invalid publish opts format (should be name=value but got ‘8881:22’).
See ‘docker run --help’.
What exactly could be wrong here? i changed the port mapping for this new container, so it’s not the same as previous one, but still getting this error. Any ideas on this please?
Thanks so much