Trying to learn Docker with game a server.

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
So I have been searching around the internet. I am trying to go from running a windows VM with steam running a dedicated server to running a Docker game server. I know the game can be run in a docker as a few links on GitHub have been made. V-Rising Docker but when using TrueNAS core. I am lost I'm new to the CLI not sure if I navigate the docker via the shell on the app or kuber via the TrueNAS shell?? I felt it would be a good learning experience to try to set this up and get it running. I have been able to load the image but thats really it im not sure how to connect to it. I saw via Kuber that it was listed but thats as far as I could figure out what to do.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
Truenas core can't run docker natively as it's bsd based and not linux based.
If you're using core you'd have to set up a linux vm to run docker.

If you're using scale and want to use native docker you'd have to hack your way around the cli.
If you want to go a supported way you could use the docker-compose app supplied by truecharts.
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
Truenas core can't run docker natively as it's bsd based and not linux based.
If you're using core you'd have to set up a linux vm to run docker.

If you're using scale and want to use native docker you'd have to hack your way around the cli.
If you want to go a supported way you could use the docker-compose app supplied by truecharts.
I am using scale, so install the Docker-compose and that should help point me in the right direction?
Any special settings I need to know when setting up the app?

when trying to install docker-compose I get "Back-off restarting failed container" in the app events. It just stays saying deploying in the top right.
 
Last edited:

DaSnipe

Explorer
Joined
Jun 26, 2021
Messages
86
I am using scale, so install the Docker-compose and that should help point me in the right direction?
Any special settings I need to know when setting up the app?

when trying to install docker-compose I get "Back-off restarting failed container" in the app events. It just stays saying deploying in the top right.
Something is likely wrong with your docker-compose file. You’d have check the logs, the application events aren’t enough, and for now there’s a bug so gotta click download logs
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
maybe this will help???
looks like if im reading it right, that it cant find the HDD to save to?
Code:
2022-06-20T03:31:27.176844977Z Generating RSA private key, 4096 bit long modulus (2 primes)
2022-06-20T03:31:27.248970043Z COMPOSE_FILE not set, not auto-loading compose-file
2022-06-20T03:31:27.303403531Z ....................++++
2022-06-20T03:31:27.793104335Z .....................................................................................++++
2022-06-20T03:31:27.793532399Z e is 65537 (0x010001)
2022-06-20T03:31:27.816684191Z Generating RSA private key, 4096 bit long modulus (2 primes)
2022-06-20T03:31:28.626855985Z .......................................................................................................................................++++
2022-06-20T03:31:29.449421848Z ..................................................................................................................................................++++
2022-06-20T03:31:29.450060276Z e is 65537 (0x010001)
2022-06-20T03:31:29.491700859Z Signature ok
2022-06-20T03:31:29.491738477Z subject=CN = docker:dind server
2022-06-20T03:31:29.492002642Z Getting CA Private Key
2022-06-20T03:31:29.508643632Z /certs/server/cert.pem: OK
2022-06-20T03:31:29.543982886Z Signature ok
2022-06-20T03:31:29.544043719Z subject=CN = docker:dind client
2022-06-20T03:31:29.544267258Z Getting CA Private Key
2022-06-20T03:31:29.561996353Z /certs/client/cert.pem: OK
2022-06-20T03:31:29.714713524Z time="2022-06-20T03:31:29.714362939Z" level=info msg="Starting up"
2022-06-20T03:31:29.718309822Z time="2022-06-20T03:31:29.718164868Z" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
2022-06-20T03:31:29.721168497Z time="2022-06-20T03:31:29.721043372Z" level=info msg="libcontainerd: started new containerd process" pid=73
2022-06-20T03:31:29.721298199Z time="2022-06-20T03:31:29.721212650Z" level=info msg="parsed scheme: \"unix\"" module=grpc
2022-06-20T03:31:29.721441116Z time="2022-06-20T03:31:29.721373186Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
2022-06-20T03:31:29.721497163Z time="2022-06-20T03:31:29.721448921Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
2022-06-20T03:31:29.721542234Z time="2022-06-20T03:31:29.721501620Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2022-06-20T03:31:29.795328624Z time="2022-06-20T03:31:29Z" level=warning msg="containerd config version `1` has been deprecated and will be removed in containerd v2.0, please switch to version `2`, see https://github.com/containerd/containerd/blob/main/docs/PLUGINS.md#version-header"
2022-06-20T03:31:29.796610479Z time="2022-06-20T03:31:29.796505557Z" level=info msg="starting containerd" revision=10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 version=v1.6.6
2022-06-20T03:31:29.821652841Z time="2022-06-20T03:31:29.821492002Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1
2022-06-20T03:31:29.821738694Z time="2022-06-20T03:31:29.821659523Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.831706256Z time="2022-06-20T03:31:29.831575254Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"ip: can't find device 'aufs'\\nmodprobe: can't change directory to '/lib/modules': No such file or directory\\n\"): skip plugin" type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.831762972Z time="2022-06-20T03:31:29.831629151Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.832389624Z time="2022-06-20T03:31:29.832298644Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (zfs) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.832433823Z time="2022-06-20T03:31:29.832336508Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.832455904Z time="2022-06-20T03:31:29.832387699Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
2022-06-20T03:31:29.832466328Z time="2022-06-20T03:31:29.832411821Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.832506719Z time="2022-06-20T03:31:29.832473861Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.833341738Z time="2022-06-20T03:31:29.833244677Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.zfs\"..." type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.846207725Z time="2022-06-20T03:31:29.846061239Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.zfs\"..." error="Output does not match what is expected on this platform: skip plugin" type=io.containerd.snapshotter.v1
2022-06-20T03:31:29.846266969Z time="2022-06-20T03:31:29.846116380Z" level=info msg="loading plugin \"io.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1
2022-06-20T03:31:29.846278280Z time="2022-06-20T03:31:29.846194710Z" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
2022-06-20T03:31:29.846291230Z time="2022-06-20T03:31:29.846218935Z" level=info msg="metadata content store policy set" policy=shared
2022-06-20T03:31:29.846702204Z time="2022-06-20T03:31:29.846623083Z" level=info msg="loading plugin \"io.containerd.differ.v1.walking\"..." type=io.containerd.differ.v1
2022-06-20T03:31:29.846755397Z time="2022-06-20T03:31:29.846681274Z" level=info msg="loading plugin \"io.containerd.event.v1.exchange\"..." type=io.containerd.event.v1
2022-06-20T03:31:29.846772863Z time="2022-06-20T03:31:29.846714026Z" level=info msg="loading plugin \"io.containerd.gc.v1.scheduler\"..." type=io.containerd.gc.v1
2022-06-20T03:31:29.846940019Z time="2022-06-20T03:31:29.846837197Z" level=info msg="loading plugin \"io.containerd.service.v1.introspection-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.846974003Z time="2022-06-20T03:31:29.846869948Z" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.847006926Z time="2022-06-20T03:31:29.846937834Z" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.847046603Z time="2022-06-20T03:31:29.846963201Z" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.847060234Z time="2022-06-20T03:31:29.846998357Z" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.847532445Z time="2022-06-20T03:31:29.847460872Z" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.848765615Z time="2022-06-20T03:31:29.848367330Z" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.848820718Z time="2022-06-20T03:31:29.848691255Z" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.848855011Z time="2022-06-20T03:31:29.848784887Z" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
2022-06-20T03:31:29.851017678Z time="2022-06-20T03:31:29.849163541Z" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
2022-06-20T03:31:29.851067781Z time="2022-06-20T03:31:29.849345707Z" level=info msg="loading plugin \"io.containerd.monitor.v1.cgroups\"..." type=io.containerd.monitor.v1
2022-06-20T03:31:29.851076495Z time="2022-06-20T03:31:29.850084461Z" level=info msg="loading plugin \"io.containerd.service.v1.tasks-service\"..." type=io.containerd.service.v1
2022-06-20T03:31:29.851087455Z time="2022-06-20T03:31:29.850163576Z" level=info msg="loading plugin \"io.containerd.grpc.v1.introspection\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851093601Z time="2022-06-20T03:31:29.850192311Z" level=info msg="loading plugin \"io.containerd.internal.v1.restart\"..." type=io.containerd.internal.v1
2022-06-20T03:31:29.851107517Z time="2022-06-20T03:31:29.850450591Z" level=info msg="loading plugin \"io.containerd.grpc.v1.containers\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851114421Z time="2022-06-20T03:31:29.850477360Z" level=info msg="loading plugin \"io.containerd.grpc.v1.content\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851120697Z time="2022-06-20T03:31:29.850503479Z" level=info msg="loading plugin \"io.containerd.grpc.v1.diff\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851129987Z time="2022-06-20T03:31:29.850525193Z" level=info msg="loading plugin \"io.containerd.grpc.v1.events\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851135952Z time="2022-06-20T03:31:29.850557775Z" level=info msg="loading plugin \"io.containerd.grpc.v1.healthcheck\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851147017Z time="2022-06-20T03:31:29.850587348Z" level=info msg="loading plugin \"io.containerd.grpc.v1.images\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851156300Z time="2022-06-20T03:31:29.850610119Z" level=info msg="loading plugin \"io.containerd.grpc.v1.leases\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851166300Z time="2022-06-20T03:31:29.850632100Z" level=info msg="loading plugin \"io.containerd.grpc.v1.namespaces\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851184135Z time="2022-06-20T03:31:29.850657811Z" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1
2022-06-20T03:31:29.851208681Z time="2022-06-20T03:31:29.851064148Z" level=info msg="loading plugin \"io.containerd.grpc.v1.snapshots\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851236721Z time="2022-06-20T03:31:29.851113658Z" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851251683Z time="2022-06-20T03:31:29.851142496Z" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1
2022-06-20T03:31:29.851263694Z time="2022-06-20T03:31:29.851173738Z" level=info msg="loading plugin \"io.containerd.tracing.processor.v1.otlp\"..." type=io.containerd.tracing.processor.v1
2022-06-20T03:31:29.851285752Z time="2022-06-20T03:31:29.851217637Z" level=info msg="skip loading plugin \"io.containerd.tracing.processor.v1.otlp\"..." error="no OpenTelemetry endpoint: skip plugin" type=io.containerd.tracing.processor.v1
2022-06-20T03:31:29.851306195Z time="2022-06-20T03:31:29.851247640Z" level=info msg="loading plugin \"io.containerd.internal.v1.tracing\"..." type=io.containerd.internal.v1
2022-06-20T03:31:29.851443128Z time="2022-06-20T03:31:29.851361360Z" level=error msg="failed to initialize a tracing processor \"otlp\"" error="no OpenTelemetry endpoint: skip plugin"
2022-06-20T03:31:29.852116097Z time="2022-06-20T03:31:29.852003881Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock
2022-06-20T03:31:29.852263316Z time="2022-06-20T03:31:29.852192270Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
2022-06-20T03:31:29.852427193Z time="2022-06-20T03:31:29.852333346Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock
2022-06-20T03:31:29.857304916Z time="2022-06-20T03:31:29.852390316Z" level=info msg="containerd successfully booted in 0.058369s"
2022-06-20T03:31:29.864998820Z time="2022-06-20T03:31:29.864839614Z" level=info msg="parsed scheme: \"unix\"" module=grpc
2022-06-20T03:31:29.865044622Z time="2022-06-20T03:31:29.864881508Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
2022-06-20T03:31:29.865082717Z time="2022-06-20T03:31:29.864910948Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
2022-06-20T03:31:29.865103188Z time="2022-06-20T03:31:29.864926983Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2022-06-20T03:31:29.867097535Z time="2022-06-20T03:31:29.866982369Z" level=info msg="parsed scheme: \"unix\"" module=grpc
2022-06-20T03:31:29.867139134Z time="2022-06-20T03:31:29.867013513Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
2022-06-20T03:31:29.867153412Z time="2022-06-20T03:31:29.867034037Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
2022-06-20T03:31:29.867182600Z time="2022-06-20T03:31:29.867045544Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2022-06-20T03:31:29.877818684Z time="2022-06-20T03:31:29.877490303Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
2022-06-20T03:31:29.877868453Z time="2022-06-20T03:31:29.877573196Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
2022-06-20T03:31:30.878989292Z failed to start daemon: error initializing graphdriver: Cannot find root filesystem WD Red drives/ix-applications/releases/docker-compose/volumes/pvc-bd6f25f7-2931-4bb0-abde-2b381e86ee56: Output does not match what is expected on this platform
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
You need the docker container to run a specific yaml file
version: '2.4' networks: privatenetwork: name: privatenetwork driver: bridge ipam: driver: default config: - subnet: 192.168.111.0/24 gateway: 192.168.111.1 services: portainer: read_only: true image: portainer/portainer-ce:latest healthcheck: disable: true container_name: portainer restart: unless-stopped security_opt: - no-new-privileges:true networks: - privatenetwork volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - /mnt/AppPool/Portainer/data:/data:rw ports: - "2001:9443"

Note that the "- /mnt/AppPool/Portainer/data:/data:rw" line will need to be specific to your use case
And
" - subnet: 192.168.111.0/24
gateway: 192.168.111.1" will also need to be an unused subnet on your network
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
You need the docker container to run a specific yaml file
version: '2.4' networks: privatenetwork: name: privatenetwork driver: bridge ipam: driver: default config: - subnet: 192.168.111.0/24 gateway: 192.168.111.1 services: portainer: read_only: true image: portainer/portainer-ce:latest healthcheck: disable: true container_name: portainer restart: unless-stopped security_opt: - no-new-privileges:true networks: - privatenetwork volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - /mnt/AppPool/Portainer/data:/data:rw ports: - "2001:9443"

Note that the "- /mnt/AppPool/Portainer/data:/data:rw" line will need to be specific to your use case
And
" - subnet: 192.168.111.0/24
gateway: 192.168.111.1" will also need to be an unused subnet on your network
Thank you for this, When placing the path in the compose_file for container configuration. I dont think its reading ti? its a .yml file not a .yaml dont think that matters but im not sure. I would pull logs but it wont let me download any the most i get is this from the app events

Exec lifecycle hook ([/bin/bash -c if [ "${COMPOSE_FILE}" ]; then counter=0; while ! docker info > /dev/null 2>&1 && [[ ${counter} -lt 10 ]]; do echo "docker not running yet. Waiting..." >> /proc/1/fd/1; sleep 5; counter=$((counter+1)); done docker-compose -f "${COMPOSE_FILE}" up -d && echo "Loading COMPOSE_FILE at location ${COMPOSE_FILE}" >> /proc/1/fd/1; else echo "COMPOSE_FILE not set, not auto-loading compose-file" >> /proc/1/fd/1; fi ]) for Container "portainer-docker-compose" in Pod "portainer-docker-compose-0_ix-portainer(5b4448c9-ae41-42cc-8a58-d71a843365a0)" failed - error: command '/bin/bash -c if [ "${COMPOSE_FILE}" ]; then counter=0; while ! docker info > /dev/null 2>&1 && [[ ${counter} -lt 10 ]]; do echo "docker not running yet. Waiting..." >> /proc/1/fd/1; sleep 5; counter=$((counter+1)); done docker-compose -f "${COMPOSE_FILE}" up -d && echo "Loading COMPOSE_FILE at location ${COMPOSE_FILE}" >> /proc/1/fd/1; else echo "COMPOSE_FILE not set, not auto-loading compose-file" >> /proc/1/fd/1; fi ' exited with 137: , message: ""
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
You have to enter the name of the compose file into the docker container
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
You have to enter the name of the compose file into the docer container
Under container configuration > image enviorment > compose_file, I wrote /mnt/WD Red drives/compose/test.yml (test is just what I named the yaml)
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Make sure there are no extra spaces / wrong tabs in the compose file. Its very fussy
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
Make sure there are no extra spaces / wrong tabs in the compose file. Its very fussy
Do you think because my main drive name is WD Red drives vs WD-Red-drives could be the issue? Because I don't think you can change the name once the pool is built or I would change the spaces to - .
I copied what you linked changed the IP and added /mnt/WD Red drives/compose/data:/data:rw to replace what you had mnt/AppPool/Portainer/data:/data:rw
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Possible. Its something I learnt a long time ago. Not to use spaces in names. Sometimes it works, sometimes it doesn't
I assume that compose is your dataset in question?
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
Possible. Its something I learnt a long time ago. Not to use spaces in names. Sometimes it works, sometimes it doesn't
I assume that compose is your dataset in question?
I GOT IT! thank you I was able to unmount my pool change the pool name in CLI zpool import "WD Red drives" WD-Drives then zpool export WD-Drives also deleted the ix-applications folder unmounted the pool restarted the system booted back and mounted the new drives changed the file paths for the new name "WD-Drives" and it works. Thank you so much I was unsure if it was the spaces or not but from now on - > space
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
I GOT IT! thank you I was able to unmount my pool change the pool name in CLI zpool import "WD Red drives" WD-Drives then zpool export WD-Drives also deleted the ix-applications folder unmounted the pool restarted the system booted back and mounted the new drives changed the file paths for the new name "WD-Drives" and it works. Thank you so much I was unsure if it was the spaces or not but from now on - > space
Just a suggestion but ... seeing as storage changes outside of the GUI are discouraged, I would take careful notes on what you did here in case you have problems in the future.
 

SomeDumbNAS

Dabbler
Joined
Aug 23, 2021
Messages
22
@mervincm Good point, I'll definitely keep a step by step file somewhere or something.

Also @NugentS I appreciate the help. I got Portainer working.(still learned alot though!) But turns out that didn't answer my problem just moved it lol.
 
Top