In this guide, I will walk you through on how to get a bot started with Docker. The following example will be a simple bot that responds with a ping/pong command.
This tutorial assumes you have some knowledge of a Unix-based operating system, terminal/command prompt commands, and a basic knowledge of creating a Discord bot using discord.js.
This tutorial uses the following:
- NodeJS (7.6.x and above)
- Docker (17.04.0 and above)
- Step 1: Setting Up
- Step 2: Creating The Project
- Step 3: Creating the Dockerfile and Running!
- Step 4: Using Docker Compose
- Step 5: Bot, Meet Redis
-
- More tutorials may be coming soon!
Docker is a project that automates the deployment of application inside of software containers. This means it will have it's own kernel, system, operating system, etc without directly effecting the host operating system. To put it in easier terms: You put your application inside a mini-fridge. Take that mini-fridge and put it inside of the big refrigerator. The fridge being the server. It has no effect on the fridge's internal mechanisms, and it keeps it "running" inside it's own happy little world.