I have made a script that buld runs and installs SteamCMD server but I noticed very weird problem that is stoping me in further development. My code:
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker pull yzere/steamcmd:latest
docker run -it -d --name=steamcmd yzere/steamcmd bash
docker exec -it steamcmd bash
/bin/bash ./steamcmd.sh +login anonymous +app_update 343050 +quit
curl -o ~/run_dedicated_server.sh https://github.com/yzere/steamcmd/blob/master/run_dedicated_server.sh
chmod u+x ~/run_dedicated_server.sh
mkdir ~/.klei/
mkdir ~/.klei/DoNotStarveTogether/
echo "Now upload MyDediServer.zip and unpack in .klei/DoNotStarveTogether/, after this again run ~/run_dedicated_server.sh"
and beside problem with docker instalation, after i run ls on my machine there was this folder: image
with the name of '.klei'$'\r' instead of intended .klei It also makes terminal go crazy when i tried to enter this directory. I really look for some kind of explaination or solution to this.
Also error message when i run this script was this
E: Invalid operation update
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io
'
E: Couldn't find any package by regex 'containerd.io
'
./server.sh: line 3: docker: command not found
./server.sh: line 4: docker: command not found
./server.sh: line 5: docker: command not found
/bin/bash: ./steamcmd.sh: No such file or directory
curl: (3) URL using bad/illegal format or missing URL
chmod: cannot access '/home/yzere12/run_dedicated_server.sh'$'\r': No such file or directory
mkdir: cannot create directory ‘/home/yzere12/.klei\r’: File exists
mkdir: cannot create directory ‘/home/yzere12/.klei/DoNotStarveTogether\r’: No such file or directory
Now upload MyDediServer.zip and unpack in .klei/DoNotStarveTogether/, after this again run ~/run_dedicated_server.sh
I run linux wersion of Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64