In this article, I'm providing you with the step by step instructions on how to install our Rocket.Chat on a Docker container.
Step 1 - Installing Git
We can install Git packages from their repositories by just running this command. Git packages are used to clone the project repository.
root@ubuntu:~# apt-get update root@www:~# apt-get install -y git Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.7.4-0ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 105 not upgraded. root@www:~# git clone https://github.com/RocketChat/Rocket.Chat.git Cloning into 'Rocket.Chat'... remote: Counting objects: 55385, done. remote: Compressing objects: 100% (177/177), done. remote: Total 55385 (delta 69), reused 0 (delta 0), pack-reused 55207 Receiving objects: 100% (55385/55385), 37.48 MiB | 10.80 MiB/s, done. Resolving deltas: 100% (38031/38031), done. Checking connectivity... done.
Step 2 - Installing Docker
Docker simplifies this installation process. Docker is an open-source project that automates the deployment of applications inside software containers. You can either install docker by apt-get install docker-engine command or you can use this below command to get the latest Docker package.
curl -sSL https://get.docker.com/ | sh
Step 3 - Installing Docker-Compose
Compose is a docker tool for defining and running multi-container applications with Docker. Using this tool, you define a multi-container application in a single file, and run that file using a single compose command to spin your application up and running. You can install the docker compose either using apt-get install docker-compose or using this below command to download the latest docker compose version:
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
You can get the latest docker compose releases and download those instead.
Step 4 - Cloning Rocket.chat
Before installing, we need to clone our Rocket.chat repository using git to a folder named Rocker.Chat.
root@www:~# git clone https://github.com/RocketChat/Rocket.Chat.git Cloning into 'Rocket.Chat'... remote: Counting objects: 55385, done. remote: Compressing objects: 100% (177/177), done. remote: Total 55385 (delta 69), reused 0 (delta 0), pack-reused 55207 Receiving objects: 100% (55385/55385), 37.48 MiB | 10.80 MiB/s, done. Resolving deltas: 100% (38031/38031), done. Checking connectivity... done.
Step 5 - Installing Rocket.chat
Now move to the Rocker.Chat folder and run our docker-compose file.
root@www:~# cd Rocket.Chat root@www:~/Rocket.Chat# docker-compose up
root@www:~/Rocket.Chat# docker-compose up Pulling mongo (mongo:latest)... latest: Pulling from library/mongo 5c68a10e9f3f: Pull complete 0110f95fa9c8: Pull complete 0cba4a42bc41: Pull complete a6eafd7fba3f: Pull complete 703d9d7e0e21: Pull complete 6c18d5bc22c9: Pull complete fd3fcba178e3: Pull complete c8b9b5488049: Pull complete 41f37d58ab4c: Pull complete Digest: sha256:beff97308c36f7af664a1d04eb6ed09be1d14c17427065b2ec4b0de90967bb3f Status: Downloaded newer image for mongo:latest Creating rocketchat_mongo_1 Pulling hubot (rocketchat/hubot-rocketchat:v0.1.4)... v0.1.4: Pulling from rocketchat/hubot-rocketchat ddf65d6bb23c: Pull complete Digest: sha256:e4c7dccc4ec00f24dd7e25febc9cf0b653df085ea42eb605fcd8409736d52559 Status: Downloaded newer image for rocketchat/hubot-rocketchat:v0.1.4 Creating rocketchat_hubot_1 Attaching to rocketchat_mongo_1, rocketchat_rocketchat_1, rocketchat_hubot_1
Running this composer file, will start downloading all the required images as specified in the docker compose file and create all three instances required for our Rocket.Chat as highlighted.
root@www:~/Rocket.Chat# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES db701321e7a2 rocketchat/hubot-rocketchat:v0.1.4 "/bin/sh -c 'node -e " 4 hours ago Up 4 hours 0.0.0.0:3001->8080/tcp rocketchat_hubot_1 f1f2c9476121 rocketchat/rocket.chat:latest "node main.js" 4 hours ago Up 4 hours 0.0.0.0:3000->3000/tcp rocketchat_rocketchat_1 082f45829ae5 mongo "/entrypoint.sh mongo" 4 hours ago Up 4 hours 27017/tcp rocketchat_mongo_1
We can view the Rocket.Chat version and configuration information during the installation phase.
That's all!! We've completed with the Rocket.Chat installation. You can access you chat application using the URL >>http://DockerIP:3000
You can register your new email account and start creating our own private group chats.
Step 6 - Managing the users and Groups
Probably, the first user registered and logged in, will be the admin user and all other user logins will be secondary ones.
You can create your own Channels/groups and set the privacy as needed. You can use the '+' icon near the Channels section to add any number of groups.
Click on the Members list options present on the right hand side to add required users to your new channel. In addition, you can use the individual user tabs below to set the user privileges.
Refer this document for more details on managing this. I hope this article is useful for you. I would recommend your valuable comments and suggestions on this. Happy Chatting!!