alternative guides (if you don't trust mine or if u need as reference to doublecheck if i missed something out )
https://medium.com/digitalfrontiers/eas ... 82b2390854
viewtopic.php?t=161125#p817632
Portainer is basically similar in function to container station (but better so i'm told. which is why i installed to try out)
There are a few ways to install portainer
1. QPKG (this is probably the easiest)
2. manually (this felt like a hack job, so i didn't do it this way. Also you need to know what you are doing)
3. container station (this is what i used, and what the guide i will be posting will be about)
step1
install container station via qnap appcenter if u haven't already.
step2
open cs then click create application, then paste this docker compose code and click validate. when it says it works, click create
Code: Select all
version: '3'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
security_opt:
- no-new-privileges:true
ports:
- 9001:8000
- 9000:9000
- 9043:9443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /share/CACHEDEV1_DATA/Container/portainer-ce/data:/data:rw
environment:
TZ: Europe/Paris
you can get your timezone codes here
https://en.wikipedia.org/wiki/List_of_t ... time_zones
in the compose above, this part above is the one you want to change to your own folder. this is for persistent storage after updating. very important
/share/CACHEDEV1_DATA/Container/portainer-ce/data:/data:rw
environment:
step3
open portainer
it should be http://your nas ip:9000/
step4
in the wizard select LOCAL. This will then detect all your existing containers that were created previously using container station. They will also now be shown in portainer.
You can also now create your docker apps using portainer now if you want.
This is a demo of me following the same guide i posted. so the end result would be something similar to this. So if you initially created docker apps in cs, they would then appear listed in the screenshot below assuming u correctly selected local during the portainer wizard setup
step5 (for maintenance)
If later you want to update the portainer docker app, just recreate the app using container station > applications. Your created portainer will be listed, select it and click recreate.
I'm not 100% sure if this will pull an update image from registry or not, but if it doesn't, you can go to cs images, then pull for the portainer image. This should get the latest image from the registry. Then you go back to applications and recreate. *this is assuming IF your first attempt did not update docker.
To confirm if it updated or not, you can open portainer and see what version it's running, whether it matches portainer from the portainer docker webpage or not where this image was pulled from.
there is a guide on how container station works to understand it better
https://www.qnap.com/en/how-to/tutorial ... -station-3
I've tested the recreate myself. My portainer settings remains intact. All the apps i have in docker are all intact.
questions you may be asking about this setup at this point
LiL0u-
I've been able to create the Portainer container and all my previous containers are detected automatically. So far so good.
What do I do with ContainerStation from now on? Won't conflict with Portainer?
AndroTux-
It will show all containers managed by Portainer as well. I personally use it to start Portainer and then leave it alone. As long as you don’t manage any containers using the ContainerStation, it should not interfere with Portainer.
https://www.reddit.com/r/qnap/comments/ ... portainer/
other comments
Honestly i flip back and forth between cs and portainer as i am still getting familiar with it.
If i am being perfectly honest, i felt that CS v3 was a bit easier for me as a newbie to manage. Not that i don't appreciate portainer (i'm not discounting some of the cons with CS implementation), but some parts felt simple like when setting up networking. Because to newbs like me, as long as it works, you don't care as much about other things. For the veterans out there, they'll probably feel better with portainer because it doesn't have the same limitations that CS has, and the're comfortable using portainer.
Also the fact that cs tends to allow you to adjust the settings before deploying. whereas when i tried the same with portainer, i would have to deploy first, then re-create to make the edits. it's different, you try it out and let me know if u felt the same or not
-Credits: Drauk from unofficial qnap discord for helping me figure this out using the docker compose to setup portainer