All images are available at https://hub.docker.com/r/tinode/
-
Install Docker 1.8 or above. The provided dockerfiles are dependent on Docker networking which may not work with the older Docker.
-
Create a bridge network. It's used to connect Tinode container with the database container.
$ docker network create tinode-net
-
Decide which database backend you want to use: RethinkDB or MySQL. Run the selected database container, attaching it to
tinode-net
network:- RethinkDB: If you've decided to use RethinkDB backend, run the official RethinkDB Docker container:
$ docker run --name rethinkdb --network tinode-net -d rethinkdb:2.3
See instructions for more options.
- MySQL: If you've decided to use MySQL backend, run the official MySQL Docker container:
$ docker run --name mysql --network tinode-net --env MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql:5.7
See instructions for more options.
The name
rethinkdb
ormysql
in the--name
assignment is important. It's used by other containers as a database's host name. -
Run the Tinode container for the appropriate database:
- RethinkDB:
$ docker run -p 6060:18080 -d --name tinode-srv --network tinode-net tinode/tinode-rethinkdb:latest
- MySQL:
$ docker run -p 6060:18080 -d --name tinode-srv --network tinode-net tinode/tinode-mysql:latest
The port mapping
-p 6060:18080
tells Docker to map container's port 18080 to host's port 6060 making server accessible at http://localhost:6060/. The container will initialize the database with test data on the first run. -
Test the installation by pointing your browser to http://localhost:6060/x/.
If you want to reset the data in the database, shut down the Tinode container and remove it:
$ docker stop tinode-srv && docker rm tinode-srv
then repeat step 4 adding --env RESET_DB=true
.
See instructions.