ogame-tbot / TBot

OGame bot
81 stars 35 forks source link

[Docker] TBot crashes when running with -d option #132

Open GabrielJean opened 2 years ago

GabrielJean commented 2 years ago

Hello,

I'm trying to package this into a reusable docker image that I can run in the background, but the software keeps crashing when using the docker option "-d"

It works fine interactively with"-it" though.

image

Thanks

WeberIT commented 1 year ago

hi, just start the container with screen its a tool where u can send commands from ur shell and run them in a virtual screen that u can close and open without the running process in it get killed...

not sure but i think the docker image thats flying around here is based on ubuntu so you should do the following to have a working fix for ur solution:

install screen with apt:

sudo apt install screen

check the installation with:

screen -v

This should reply the Version number of screen...

Screen usage:

Now all you need to do is add the following infront of your Docker run -it ..... command:

screen -dmS TBot

Just an Example of your Docker command naked:

Docker run -it --name TBot-Ogamed --expose 9090:9090/tcp omlet05/tbot

this would turn into

screen -dmS TBot Docker run -it --name TBot-Ogamed --expose 9090:9090/tcp omlet05/tbot

after that if you have only one screen open just use:

screen -r

or if you have multiple screens open you have to use the session id

List Screen Sessions:

screen -ls

Connect to a Screen Session:

screen -r SESSION ID (Number infront of the first DOT)

Leave a Screen Session:

CTRL + A + D to disconnect the Screen (Bot keeps running)

Below are some most common commands for managing Linux Screen Windows:

Create a new window (with shell).

Ctrl+a c 

List all windows.

Ctrl+a " 

Switch to window 0 (by number).

Ctrl+a 0 

Rename the current window.

Ctrl+a A

Split current region horizontally into two regions.

Ctrl+a S

Split current region vertically into two regions.

Ctrl+a | 

Switch the input focus to the next region.

Ctrl+a tab 

Toggle between the current and previous windows

Ctrl+a Ctrl+a

Close all regions but the current one.

Ctrl+a Q

Close the current region.

Ctrl+a X 

Now i just saw its allready explained in the AWS install Section ;)