Licode Docker Image

To run a Licode docker container you have two options:

Both options require that you have docker installed on your machine.

Run the container from the latest release in Docker Hub

The easiest way to run licode is to use the image we provide 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:

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.

Note If you do not want to have to use sudo in this or in the next section follow these instructions.

Where the different parameters mean:

Once the container is running you can view the console logs using:

    sudo docker logs -f licode

To stop the container:

    sudo docker stop licode

Additionally, if you want to run a single Licode component inside the container you can select them by appending --mongodb, --rabbitmq, --nuve, --erizoController, --erizoAgent or --basicExample to the docker run command above.

Build your own image and run the container from it

You have to git clone Licode's code from GitHub and navigate to docker directory. There, to compile your own image just run:

    sudo docker build -t licode-image .

This builds a new Docker image following the steps in Dockerfile and saves it in your local Docker repository with the name licode-image. You can check the available images in your local repository using:

    sudo docker images

Note If you want to know more about images and the building process you can find it in Docker documentation.

Now you can run a new container from the image you have just created with:

    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