Skip to main content

Running on Docker (WIP)

Running galactica via Docker is probably the easiest and best way to do so because you just need to install Docker and nothing else, all the dependencies are managed by the container itself and this means that you host machine will not be bloated with the dependencies of the bot and everything will be isolated inside of the container.

caution

Using Docker may consume more resources than running it bare metal especially on Windows although im may use around 100 to 500 MB/s more RAM than running it as it is, I think that the advantages outweigh the disadvantages.

First if you haven't done yet, you need to download Docker from the prerequisites page or on Linux just by using your distro's package manager.

Building the Docker image

To build the image first you have to go to the root directory of the bot and then run this command:

docker build -t galactica-bot .

What this is gonna do is that it's going to build the image according to the Dockerfile and name it galactica-bot.

NOTE: You need to have your bot already configured before you build the image because if you do it after the container is not going to receive the changes!

Running the container

Now that we have built the image we need actually run it to do so just run:

docker run -it galactica-bot

Stopping the container

First step of stopping the container is to find the container ID to do so run:

docker container ls -a

This command will list all of the containers are on your system and it's output should look something like this:

Command output:
CONTAINER ID    IMAGE        COMMAND                  CREATED        STATUS
b28cbaa91f15 galacti... "/entrypoint.sh couc…" 5 hours ago Exited (0) 3 hours ago

the container ID is the first parameter that should show up, to stop the container just run:

docker stop <CONTAINER ID>

And make sure to change the ID according to your containers one accordingly, also don't type the brackets

warning

If you want to rerun the container you should do the process mentioned below otherwise it's gonna make a new container each time if you run docker run -it archiso again and again.

Rerunning the container

Rerunning the container is simple copy it's ID and then run:

docker run -it <CONTAINER ID>

Troubleshooting

If you get an error like this:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Then the issue is that the docker service is not running, to start it run with administrator privileges:

dockerd

this should fix the issue