Skip to content

Commit

Permalink
Fixed Docker image for firefox adding network settings (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
lodoyun authored May 5, 2017
1 parent 68bcef8 commit ec74090
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions doc/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Both options require that you have [docker](https://docs.docker.com/installation

The easiest way to run licode is to use the [image we provide](https://hub.docker.com/r/lynckia/licode/) in Docker Hub. In this case you have only to execute the run command. But now the image name is lynckia/licode:*version* where `version` is the release you want to use:

sudo docker run -d --name licode -p 3001:3001 -p 8080:8080 -p 3000:3000 -p 30000-31000:30000-31000/udp -e "PUBLIC_IP=XXX.XXX.XXX.XXX" lynckia/licode
MIN_PORT=30000; MAX_PORT=30050; sudo docker run --name licode -p 3000:3000 -p $MIN_PORT-$MAX_PORT:$MIN_PORT-$MAX_PORT/udp -p 3001:3001 -p 8080:8080 -e "MIN_PORT=$MIN_PORT" -e "MAX_PORT=$MAX_PORT" -e "PUBLIC_IP=XX.XX.XX.XX" lynckia/licode

> **Note**
> If you do not specify a version you are pulling from `latest` by default.
Expand All @@ -22,10 +22,11 @@ The easiest way to run licode is to use the [image we provide](https://hub.docke

Where the different parameters mean:

* `-d` indicates that the container runs as a daemon
* `--name` is the name of the new container (you can use the name you want)
* `-p` stablishes a relation between local ports and a container's ports.
* `PUBLIC_IP` tells Licode the IP that is used to access the server from outside
* `MIN_PORT` and `MAX_PORT` defines the udp port range used for webrtc connections.
* Alternatively to the previous two options you can use `--network="host"` to let the container use the dock network and avoid NAT.
* the last param is the name of the image

Once the container is running you can view the console logs using:
Expand Down Expand Up @@ -59,5 +60,5 @@ This builds a new Docker image following the steps in `Dockerfile` and saves it
Now you can run a new container from the image you have just created with:
```
sudo docker run -d --name licode -p 3001:3001 -p 8080:8080 -p 3000:3000 -p 30000-31000:30000-31000/udp -e "PUBLIC_IP=XXX.XXX.XXX.XXX" licode-image
MIN_PORT=30000; MAX_PORT=30050; sudo docker run --name licode -p 3000:3000 -p $MIN_PORT-$MAX_PORT:$MIN_PORT-$MAX_PORT/udp -p 3001:3001 -p 8080:8080 -e "MIN_PORT=$MIN_PORT" -e "MAX_PORT=$MAX_PORT" -e "PUBLIC_IP=XX.XX.XX.XX" licode-image
```
6 changes: 4 additions & 2 deletions extras/docker/initDockerLicode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,15 @@ if [ "$NUVE" = "true" ]; then
run_nuve
fi

echo "config.erizoController.publicIP = '$PUBLIC_IP';" >> /opt/licode/licode_config.js

if [ "$ERIZOCONTROLLER" = "true" ]; then
echo "config.erizoController.publicIP = '$PUBLIC_IP';" >> /opt/licode/licode_config.js
run_erizoController
fi

if [ "$ERIZOAGENT" = "true" ]; then
echo "config.erizoAgent.publicIP = '$PUBLIC_IP';" >> /opt/licode/licode_config.js
echo "config.erizo.minport = '$MIN_PORT';" >> /opt/licode/licode_config.js
echo "config.erizo.maxport = '$MAX_PORT';" >> /opt/licode/licode_config.js
run_erizoAgent
fi

Expand Down

0 comments on commit ec74090

Please sign in to comment.