Docker
How to host discord bot project using docker
Docker is an open-source platform that simplifies the creation, testing, and deployment of applications in containers, which are isolated and lightweight environments containing everything needed to run an application, ensuring consistency and portability across different development and production environments.
You must have Docker installed and basic knowledge of Docker. to follow this guide!
Create a Dockerfile
in the project root with the following contents:
Create a .dockerignore
file in the project root with the following contents:
Then run the command below:
The -t
flag set a name for the image, in this case it will be discord-bot
After that, just run a container with this image.
The --name
flag set a name for the container, in this case it will be my-bot
That's enough, your application will be online in moments.