QNAP TS-877 Truenas Journal

wow i got this from portainer

Latest News From Portainer

We are aware of compatibility issues with older versions of [Portainer and Docker 26]. Portainer version 2.20.1 resolves the known issues, and we recommend updating to 2.20.1 if you need to use Docker 26. You can find out more in our blog post Portainer and Docker 26.

i went to say portainer github, their docker compose still has the service shown in the docker compose, but with new docker this is no longer valid.

but across the whole docker ecosystem, if you want to deploy docker, you must remove that version line to be able to do so.

lots of github repos they donā€™t update their docker compose often. just something to watch out for.

iā€™m not saying this isnā€™t a good change, itā€™s just that people like me who hasnā€™t been active with docker deployments (mine was already setup while back and just worked), would not be aware of these changes.

On the 20th of March 2024, version 26.0.0 of Docker was released. There are a number of changes in this release to be aware of, with one in particular causing issues with older versions of Portainer. Version 2.20.1 of Portainer, now available, includes fixes for the known incompatibilities with Docker 26, and we plan to add full support for Docker 26 in our next LTS release (2.21), due in a few months time.

Whatā€™s the issue?

The specific issue manifests in being unable to view image details or access the container console when running Portainer on a Docker 26.0.0 environment. This is a result of the removal of the Container and ContainerConfig fields from the response of Dockerā€™s GET /images/{name}/json API endpoint. Portainerā€™s implementation relies on these fields existing in the response it receives from the Docker API, and as such an error is returned.

yikes so even with the current release itā€™s not quite fully supported just yet. got to wait months.

So either i deploy without portainer, then once portainer is fully fix, then redeploy but using portainerā€¦

might have to postpone. Itā€™s not mission critical for me. o well

The volumes are bind mounts relative to the jail

ie

  • /path/in/jail:/path/in/container

not path/in/pool:/path/in/container

1 Like

Or you could use dockge

ty for the correction

yeah now might be a good time.

the thing is, back when i looked at dockge, i donā€™t think it supported env back then. not sure about now

but tbh, iā€™m not one for drastic changes. currently right now switching from qts to truenas was a big change for me. one iā€™ve been procrastinating because i knew i would get a huge hassle to do so.

so switching to a different magement platform for docker after so many changes is a bit much for me.

iā€™ll think about it. maybe watch a new dockge youtube see how things are in itā€™s current form first at least.

iā€™m an old dog, hard to learn new tricks :sweat_smile:

The primary reason why i use portainer besides my familiarity and gui for managing docker containers, is also the fact i know how to use the networking features using it to setup macvlan for a static ip for my containers with it. without that i wonā€™t know how to do the same on another platform.

itā€™s hard to move unless i can account for all the things i need to be able to do on the alternative platform.

It supports env now, and in fact supports nested Dockge agents, which is pretty cool.

image

What I like about dockge is its basically just a manager for your compose files ā€œon diskā€, ie the ones actually located on your pool

1 Like

the dockge dev is also the same guy responsible for uptime kuma. an amazing docker app for monitoring uptime (even worked for stuff that donā€™t have that fucntion).

so no surprise that the ui elements were repurposed for dockge as well hehe

1 Like

what i liked about dockge at the time, it showed you exactly what it was doing as you were doing stuff. very verbose. i thought that was neat.

Iā€™m working on a tutorial for itā€¦

1 Like

wowā€¦ dockge docker compose changes reflect the new docker version. updated as recent as 5 days ago.

services:
  dockge:
    image: louislam/dockge:1
    restart: unless-stopped
    ports:
      # Host Port : Container Port
      - 5001:5001
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data:/app/data
        
      # If you want to use private registries, you need to share the auth file with Dockge:
      # - /root/.docker/:/root/.docker

      # Stacks Directory
      # āš ļø READ IT CAREFULLY. If you did it wrong, your data could end up writing into a WRONG PATH.
      # āš ļø 1. FULL path only. No relative path (MUST)
      # āš ļø 2. Left Stacks Path === Right Stacks Path (MUST)
      - /opt/stacks:/opt/stacks
    environment:
      # Tell Dockge where is your stacks directory
      - DOCKGE_STACKS_DIR=/opt/stacks

:smiling_face_with_three_hearts:

wait stux, iā€™m very confused now. after what you said, i went back to the doc to re-read

it says this

--bind='/host/path/to/:/jail/path/to'

that was my assumption and itā€™s working as such. left side is datasets residing outside jailmaker dataset, while the right side is merely the location you use e.g. cd /mnt/docker/compose and it points to the external dataset location you specified on the left side. that is my understanding as such and how iā€™ve seen it work for myself without issue.

but now you are saying its the otherway around? or maybe i am misunderstanding what you are saying ^^;

dockge guide?

can you kindly please also include where to put

      - DOCKGE_STACKS_DIR=/opt/stacks

i was browsing and saw this in jailmaker
/mnt/xxxxxx/jailmaker/jails/docker/rootfs/opt

but if i had to guess, the stacks should be stored on an external dataset, something similar to the /docker/compose/ or /docker/data

so should i make a /docker/stack and point the location for dockge there?

iā€™ll wait for your guide xd


So if anyone is wondering why is most of the convo now leaning to docker containers lately, well

for basic usage, truenas simply stores your data. thatā€™s about it. sounds mundane but itā€™s a very important function for most of us.

but if you want to do more stuff, then you can begin to venture to doing stuff like self hosting. docker is one of the popular choices for install a self hosted app e.g. jellyfin, plex, etcā€¦

so 3/4 or mid point into this thread we already had successfully setup truenas on the QNAP TS-877 for basic storage accessible via smb (nfs also if you configure that which i havenā€™t yet). this basic use has already been concluded is what i am saying more or less.

the rest of the thread discussion at this point will mostly lean heavily on docker container setup since this is still ongoing.

and may touch up on some truenas update changes, or some other stuff now and then.

that is the summary update for this thread for now :sweat_smile:

when bind mounting the config for a jail, its pool:jail

when bind mounting the config for a docker containerā€¦ ie what is in a compose.yaml file, its jail:container

you donā€™t need to do anything special for the dockge directory, it will be created in the jail, and will go away when the jail goes away. The only thing stored there is the password you create when you first login.

if you wanted to you can bind mount docker/data/dockge:/opt/dockge in your jail config

1 Like

oo i get what you mean now. that makes sense thx.

thx for the dockge tip i will try it soon

interesting vpn setup for dockge

basically if your container requires a vpn, you can simply slot it in to work with gluetun. easy

if you are using a vpn service i recommend mulvad. though itā€™s not for netflix, you have to find a different vpn for that purpose (i donā€™t have a good recommendation for that though i heard expressvpn works for netflix). Not affiliated, just making a general recommendation. You can dyor

you can use the vpn for containers like torrent clients qbitorrent as an example.

some vpn usage may encounter cloudflare challenge especially when browsing the web as example (vpns tend to trigger cloudflare protection often) There is a separate app that accounts for that.

if your usage of vpn is merely to connect to a vpn server you own offsite, then a vpn subscription service isnā€™t required for such usage.

was re-reading thread to check if i missed anything.

this caught my eye.

you mentioned setting static ips for dhcp using pfsense. i use pfsense too.

Is this how you are assign static ips for the docker containers? is that what you meant?

i need to figure out how to do that for a bridged network x-x; cauz i need some of them to at least be on the same subnet e.g. 192.168.0. 1-255

so they would be on the same private vlan so i can ccess them over the network.

atm i noticed my docker got issued a ip of 192.168.0.24

though i am not sure how it got that ip or how to change or or whether even itā€™s a static or dhcp (and how to make sure itā€™s static)

I pretty much just setup bridge based on this youtube, thatā€™s all i did in regards to networking

a quick crash course on the general info what docker is for beginners

just some basic docker usage tips

  1. go to truenas shell in the UI

  2. we log into the docker jail created earlier with jailmaker
    jlmkr shell docker

at this point we can start doing our docker stuff

earlier i had created some dockers as test.

anyway, if you type dir or ls, nothing shows. this is because we need to enter the mount bind directory we had set for the docker jail. so do this

cd /mnt/docker

now we can do either dir or ls to display the directories and files in the current location.

so i change to my compose directory where i put all my docker-compose.yaml files

cd compose/dockge

then i install dockge
docker compose up -d

let it complete, then your dockge should be up.

your docker lan ip should be listed earlier if you go to jlmkr list

the port for your dockge is same as in the docker compose.yaml

e.g.

http://192.168.0.24:5001/

to remove previous test docker containers i no longer want (since i will be deploying them through dockge), you do this

this lists the dockers on your docker jail
docker ps

first stop the docker container
docker stop whoami

then remove it, refer to here for the command

at this point we donā€™t have to worry about that, since we will be using dockge from this point onwards for managing our docker deployments e.g. deploy, delete, stop, start, etc

1 Like

thx stux

so i was pondering how to handle non root user for deploying docker containers.

with stuxā€™s hint, i created a docker user through truenas user creation.

i want to initially create a docker group, but it said it already exists hmā€¦

so i create the user first, then click the create group with same name.

this then created a 1000:999

in linuxserver and most docker compose yamls they do 1

  • PUID=1000
  • PGID=1000

aka 1000:1000

for the non root account. but close enough, i just have to edit each time to match

i donā€™t know if this will work or not, still testing.

whenever you deploy a linuxserver docker compose, they will usually nag not to use root user for deploying containers. they are absolutely correct.

so hopefully this works

as you can tell acls is not my forte. but i have to try master this since it is important, there is no going around it. and you only learn through doing.

1 Like