Let's put things into perspective: - You make the video - You maintain a blog with the documentation - You explain issues and reasons - I perform the process and everything works (when I needed to clear out some doubts, I went to your documentation, and everything was there) LOVELY JOB !
I rebuilt my docker setup this week and used the ubuntu 22.04 container template. its small and fast. So far its had no issues. All of my virtualization is handled in proxmox because its just so easy.
I did the same, a few weeks back using ubuntu server template, as I wasn't aware of turnkey core template. Also, instead of adding the Portainer host, I simply installed the Portainer *agent* (a single command), and connected it to an existing Portainer Environment that I have running on an old bare-metal Ubuntu server. Now I can view/access/modify (using a single Portainer view), all my docker containers running on multiple VM's and in multiple Proxmox LXC's (each running docker and the portainer agent). It's not a Docker swarm, or a Kubernetes cluster, but for my simple home-lab needs, it works GREAT!
Got it working just fine following your instructions on Proxmox 8.0.3. I used Debian 11 for my container because I want the reliable and long-lasting support. Thanks so much for the guide!!
First time i watch one of your videos and it's great! Just like your wiki. What a fantastic resource to have! You sir can definitely have my subscription! Thanks!
If turnkey core isnt showing up for you, likely if you have a fresh install then: Step 1. Open shell Step 2. run "pveam update" Step 3. Watch this video.
thank you very much sir/Geeked! Your instructions got me up and running without any errors.....Thanks a lot for putting this together. THis is a very useful piece of documentation. Thanks ! -dan
I run docker containers on turnkey core 16.1 for about 6 months now, they didn't update their LXC's ever since. So, it was a mistake to use it. For Wireguard and some other stuff I run Debian 11 and Ubuntu 21.1.
thanks Jeremy , I like the video, it is to the point (LXC only root) , vm can be a admin privileged user account. psst I like your book stack wifi. it is one of my favorite bookmark.
Just curious - I've JUST gotten into Proxmox 7.1 with LXC and I see a Debian 11 container listed for download. Since Proxmox 7.1 runs on Debian 11, wouldn't this be the better foundation? Or to put it another way - what's the benefit of turnkey core over using Debian 11 for LXC? I didn't hear anything in the video about that.
You could also make the argument to use Ubuntu for containers since Proxmox’s kernel is based on a modified Ubuntu kernel. It doesn’t really matter. Just use whatever environment that you’re comfortable with. In my case it’s Debian and Ubuntu.
Did you try installing docker in a LXC container on Proxmox VE 7? How did it go and what other methods have you used? Always keep in mind there could be security risks when doing things some random UA-camr does ;)
Well, just couple of days ago I made it running on ubuntu 20.04 lxc. Comparing template file sizes ubuntu lxc is pretty much the same. Tutorial available on YT, perhaps good idea to make resource comparison video btwn TKcore and Ubuntu?
I tried several different guides and was hitting a wall -- all kinds of weird stuff happening. I nearly dropped back and punted and used VMs instead. THIS guide was the one that worked for me (PVE 7..3-3)
the get-docker script fails because 17.1.1 turnkey core template fails apt update with the following error. "file size has unexpected size" mirror in progress? its been 48 hours and i still have this error so i can't install docker.
You had an older video where you specifically unchecked the 'Unprivileged container' option. What's changed with this video, why is 'unprivileged container' checked? Are you now able to run docker with unprivileged permissions without it affecting any services in containers?
i try to install docker-compose inside LXC and when try to build container by command docker-compose up display this error ERROR: for root_es01_1_821477422c1a Cannot start service es01: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:446: setting rlimits for ready process caused: error setting rlimit type 8: operation not permitted: unknown I think the docker-compose not run under root permission ? how can solve this issue
Thanks for this video! I have portainer and docker running but it keeps telling me that there is an upgrade available. Is there a process to upgrade portainer in the LXI docker container? I followed the instruction on the portainer site and it broke it. I had to reinstall via your instructions to get it working again but am back to the older version.
Is there anyone that can explain to me if there are any implication if you have created a LXC template in Proxmox 6 based on the previuos video from Geeked, using a privileged container without keyctl, and then using that to create containers in Proxmox 7?
Great technical video! I do have a question, I used this video and some others to create an LXC Docker Swarm, was pretty easy for a noob in this space! I got the swarm added in Portainer connected to the swarm manager (the default first install for swarm). I then did some research about how to "share" storage in the swarm, so that each node isn't independent. First question, do I need to even worry about this in a swarm? If so, in LXC it's not easy (if even possible in Proxmox 7+) to run NFS client and mount an NFS endpoint. I think it would be awesome to expand this video you did above with taking it further and possibly how to solve "shared" storage across a Swarm set of nodes....I know this is more than your video above ;-)
I’m just getting into Promox and I’m so glad I found your channel! I have one question. Do I install all my docker containers in this one LXC or I’d go through this step again and have multiple LXC for each of my docker containers?
You can have multiple docker containers inside the LXC one. However if you want to scale out (more resources), you are free to add more LXC hosts and also run Docker there.
Thank you for the video sir. May I ask you a question? I'm having trouble when using HA on my containers. The problem is that It migrates the container, but the container won't start on another node because of the local pve that it was installed on the origin node. And I couldn't find a way to install the containers on my iSCSI shared drives. Is It possible to do?
this seems really good but at timestamp 3:53 you pasted a line and said it didn' and you would sort it... what did you do to sort it as it didn't work for me either??? #linuxnoob
for some strange reason when I want to access the portainer interface in the browser it tells me "***.***.***.*** sent an invalid response" I've tested multiple ports to see if I was missing and double cheked the ip :p
All went well but docker never starts after a server reboot, I then have to reboot the container or manually start the docker service. any ideas? systemd[1]: Dependency failed for Docker Application Container Engine.
I am a bit curious... You gave it 32 gig of space. What happens when I need to install a Microsoft SQL Server 2019 docker and want to give it 250g of space when there is only 32 gig available? There must be a way to map storage to a docker. Please explain as no one ever seems to. Thank you so much!
What does turnkey stand for? Is this build any different then classic debian lxc? Also, isn't running docker on lxc unsafe? Not trying to provoke anyone or anything, it's just something I heard and I don't understand why...
@@selfhosted Guess my reply got borked by the mothership. I lost the UA-cam video that had shown up in a search result that may have resulted in the desired result. Ideally with the latest Docker Compose v2.2.3. I modified your install instruction with docker-ce and docker-ce-cli and added docker-comepose. It pulled v1.21.1.
Hi did exactly these steps, on proxmox 7.1-4 using turnkey-core 16.1-1. but after booting I cannot login using root I tried multiple times creating a container with real simple password for root, but keep getting this error: "Login incorrect" this is driving me crazy any ideas?
hey community! Is that still relevant today I do mean 2023? @Noted what do you exactly mean by saying: Lower Resources by 80% Compared to VMs Is that becasue you are using TurnKey Core as Containerized OS (LXC)?
I'm using Proxmox 7.0-11 with ZFS. I created a Ubuntu 20.04 LXC container with "nesting" and "keyctl" features enabled. Then I installed Docker. It works but the disk space increase tremendously and then becomes unusable! Is there any solutions?
Is this happening without installing anything further? I've never seen this happen before with just docker alone installed. Could it be an app you installed via docker causing the issue? Let me know,
@@selfhosted Did know why my reply wasn't posted... anyway... thanks for your reply. Yes, I'm trying to install Dokku which uses Docker. Do you think the issue could be related to ZFS?
@@KaMZaTa I saw the same issue with a debian LXC and Docker (Nextcloud, MariaDB, Treafik) on proxmox. It kept eating all my space in my LXC even when the dockers were just sitting idle. After a few days 30 GB. I switched to a VM with debian and the issue was gone.
Hello I am new to proxmox I am trying to change the name of the Container via command line .. Unfortunately I am not succeeding ... I need to do it by command line and not through the web interface ... and it is from the container itself ... Thanks
@@systecservicos6275 First step is to find out the conatiner ID. Example: docker container ls --format "{{.ID}}: {{.Names}}: {{.Status}}" That should show you something like a572804e9654 OldName Now you run a command like docker container rename CONTAINER NEW_NAME, in this case docker container rename a572804e9654 NewName That should do the trick ...
Not working for me. after following over and over again all the commands on apt update the docker line is not showing up. i guess i ditch proxmox and go back to unraid - way better
Hi. Thank you for this. Really interesting for a newb on Proxmox. I have been running all my Docker containers on a Synology NAS and want to move them to my new Proxmox sever. I see that the main concern with this method is the lack of pass through when using LXC containers. I am not sure what types of use cases I would need pass through for. Are you able to give me any examples of where pass through would be required/useful? Thanks again!
One would be passing through a GPU if you need it for Plex, Emby or Jellyfin. I never needed a GPU for encoding so this is never an issue for me. Smart home apps might need USB dongles and that's another example.
@@selfhosted Many thanks. I Now get what we mean by pass through. I too will not have the need for GPU on the docker containers.The only USB use case I can think of for me is if I move my PI4 Home Assistant over to Proxmox - If I do that I will use a VM specifically for it I think and then will have the USB available. Thanks again!
This is great, but very confused. Has this not been possible for a long time? Been running proxmox for at least 2 years now and each of my servers has at least one Debain LXC container that's nothing but a docker host with portainer installed to manage the docker stacks. Or is this just specific to the "turnkey core" LXC?
Honestly, if you have the resources, I’d stay on a VM. This is for people who have very little ram and cpu. The VM gives you better control over pass through.
What a wonderful video! I am just planning to get into Proxmox. This looks like a great way to run Docker. Question. What limitations, if any, are there running Docker in a LXC container? On a completely different note, do you run Home Assistant on Proxmox, and, if so, how? Container? VM? Thanks!
One of the biggest limitations with LXC is you can't use passthrough like you can with a VM. I would use a LXC for Home Assistant as I have in the past. It works very well.
@@selfhosted I was just about to ask if you knew how to passthrough a USB device. Apparently it can be done but so far I haven't been successful at it. Been searching everywhere for a guide that works.
Why use that bloated turnkey template instead of just plain Alpine, Debian or Ubuntu? And on that note - why use a container at all and not just install Docker directly on bare metal Proxmox? Saves resources, makes management a lot easier, especially storage/volumes, and isn't any less secure than granting keyctl access to a container. You get the ability to back up the container, but with Docker it's much easier to just back up the mounted volumes instead. So, why run Docker in LXC?
Yeah, he could of used another linux container image. Result would have been about the same. Turnkey linux as the name suggests has a few things pre-config'd for container use. Check their site out, they give details on the specific tweaks they do. As for your second question it's unsupported and bad practice to fck around with the hypervisor. The hypervisor should be rock solid / stable because if that goes down it takes everything with it. In production you would never run an unsupported config, you don't know what trouble you're going to run into and you will be refused help form the vendor. Home use you do you.
i've been running this for some time now and this setup is really slow, it has insanely high io latency all caused by the VFS storage driver that is being used by docker edit: Solution: create and mount an XFS zvol in LXC (Intel660p is the pool that im using, (default is local_lvm), and docker_lxc_300 is the volume that im creating) (on host) zfs create -s -V 30G Intel660p/docker_lxc_300 mkfs.xfs /dev/zvol/Intel660p/docker_lxc_300 (the volume should be sparse so it should only take up as much space as it is actually being used, 30gb being the max, but given it is an XFS volume it is possible to expand it) set the right permissions within the filesystem to match the root user in the unprivileged lxc container, should be mapped to 100000 by default mkdir /tmp/zvol_tmp mount /dev/zvol/Intel660p/docker_lxc_300 /tmp/zvol_tmp chown -R 100000:100000 /tmp/zvol_tmp umount /tmp/zvol_tmp (in lxc) finally, if adding to a container that already has docker installed, back it up then completely uninstall docker and be sure to remove /var/lib/docker (rm -rf /var/lib/docker), (on host) then finally, on the host, edit /etc/pve/lxc/.conf (nano /etc/pve/lxc/300.conf) and add: (change mp0 to mp1 ,etc if thats already being used) mp0: /dev/zvol/Intel660p/docker_lxc_300,mp=/var/lib/docker,backup=0 finally boot up the lxc and install docker again cons: snapshots do not work in this configuration, however backups do but they do not include /var/lib/docker, but they will backup any docker bind mounts which is what's important, to restore any given backup you will have to sort out docker each time, get it working then you can redeploy your containers using the same bind mounts alternatively I have read that it is also possible to use ext4 instead of xfs (mkfs.ext4 /dev/zvol/Intel660p/docker_lxc_300 ,and the rest is the same as above) to get the snapshots working, though i have not tried that but that will come with the disadvantage of being unable to expand that volume
Important to know that if you are like me who started with Proxmox today Apr 2023 and the version is 7.4-3 there is absolutely no Turnkey Core at all in the templates. As a matter of fact comparing the tiny template list my proxmox is showing comparing it with other videos they definitely removed a ton of stuff. I just tried downloading turnkey core from the web and then upload it as a template but the damn proxmox don’t like it either saying that is a “wrong extension”. No much luck on my first day with proxmox, I think I may go back to esxi 😂
Make sure your LXC storage isn't on ZFS. You'll run into problems, otherwise. Actually, docker in a Proxmox LXC is a bad idea, but people never listen, so...
Let's put things into perspective:
- You make the video
- You maintain a blog with the documentation
- You explain issues and reasons
- I perform the process and everything works (when I needed to clear out some doubts, I went to your documentation, and everything was there)
LOVELY JOB !
I rebuilt my docker setup this week and used the ubuntu 22.04 container template. its small and fast. So far its had no issues. All of my virtualization is handled in proxmox because its just so easy.
I did the same, a few weeks back using ubuntu server template, as I wasn't aware of turnkey core template. Also, instead of adding the Portainer host, I simply installed the Portainer *agent* (a single command), and connected it to an existing Portainer Environment that I have running on an old bare-metal Ubuntu server. Now I can view/access/modify (using a single Portainer view), all my docker containers running on multiple VM's and in multiple Proxmox LXC's (each running docker and the portainer agent). It's not a Docker swarm, or a Kubernetes cluster, but for my simple home-lab needs, it works GREAT!
Now I can finally get rid of my full qemu vms running docker, nice!
By the way, this approach still works with Proxmox V8. Great video: succinct and to the point.
my first docker experience, 10years in IT learn something new every day.
Got it working just fine following your instructions on Proxmox 8.1.3, many thanks !
Got it working just fine following your instructions on Proxmox 8.0.3. I used Debian 11 for my container because I want the reliable and long-lasting support. Thanks so much for the guide!!
I never find time to really work with docker maybe this will help me find the time grate video
Great Video! So Glad to have you back again! Always find your video's so interesting and easy to follow!
First time i watch one of your videos and it's great! Just like your wiki. What a fantastic resource to have! You sir can definitely have my subscription! Thanks!
If turnkey core isnt showing up for you, likely if you have a fresh install then:
Step 1. Open shell
Step 2. run "pveam update"
Step 3. Watch this video.
it's so nice of him to include this bit of information in the video 🙈
Took me longer than I would have liked, but hot damn this totally worked! Thanks
thank you very much sir/Geeked! Your instructions got me up and running without any errors.....Thanks a lot for putting this together. THis is a very useful piece of documentation. Thanks ! -dan
Excellent! I'm new with Proxmox and this helped a lot. Well done. Many thanks!
working with proxmox 7.1-10. thanks for this tutorial
Thanks, eh? I was very close, but missed the proxmox settings. Much appreciated!
Awesome. Straight forward and good audio. Thanks. Love the wiki too
I run docker containers on turnkey core 16.1 for about 6 months now, they didn't update their LXC's ever since.
So, it was a mistake to use it.
For Wireguard and some other stuff I run Debian 11 and Ubuntu 21.1.
thanks Jeremy , I like the video, it is to the point (LXC only root) , vm can be a admin privileged user account. psst I like your book stack wifi. it is one of my favorite bookmark.
This was TOO EASY!!! ...Now all i need is an understanding of Swarm and/or K8s... DAMN my Homelab Hobby - I want M0Ar!! (liked and Subbed) :)
Just curious - I've JUST gotten into Proxmox 7.1 with LXC and I see a Debian 11 container listed for download. Since Proxmox 7.1 runs on Debian 11, wouldn't this be the better foundation?
Or to put it another way - what's the benefit of turnkey core over using Debian 11 for LXC? I didn't hear anything in the video about that.
I was asking myself the same thing
You could also make the argument to use Ubuntu for containers since Proxmox’s kernel is based on a modified Ubuntu kernel.
It doesn’t really matter. Just use whatever environment that you’re comfortable with. In my case it’s Debian and Ubuntu.
Amazing vid, thanks for sharing man!
Glad you enjoyed it!
Thank you so much, this worked perfectly
Very well done. Thank you.
hello👋 thank you for your video works great.👌👌 I have version 7.2-11 greetings from sweden👋
Great worked for me!
Thanks
Excellent video!
I noticed that when you run docker in an LXC you might get issues with some containers, for example I had many problems with the collabora docker.
Nice video! Cheers for the idea
great video but lower your resolution so we can see what your are doing
You can just install sudo, its not included by default on most debian installs.
Super video. Thank You! 👍
Great video, but sadly i cannot get the port 9000 GUI to work.
Did you try installing docker in a LXC container on Proxmox VE 7? How did it go and what other methods have you used? Always keep in mind there could be security risks when doing things some random UA-camr does ;)
I have currently a Blog running Turnkey Wordpress LXC template
I just run docker directly on the proxmox os
Well, just couple of days ago I made it running on ubuntu 20.04 lxc. Comparing template file sizes ubuntu lxc is pretty much the same. Tutorial available on YT, perhaps good idea to make resource comparison video btwn TKcore and Ubuntu?
@@reputationpen1817 This is a bad idea and Proxmox themselves recommend against it.
I don’t have the template available, I tried pvem update and got an error is not working
I tried several different guides and was hitting a wall -- all kinds of weird stuff happening. I nearly dropped back and punted and used VMs instead. THIS guide was the one that worked for me (PVE 7..3-3)
great video , was very useful to me, :)
keyctl is greyed out when unprivileged is unchecked for me. running proxmox 7.1-6.
very very cool, thank you very much! :)
the get-docker script fails because 17.1.1 turnkey core template fails apt update with the following error. "file size has unexpected size" mirror in progress?
its been 48 hours and i still have this error so i can't install docker.
Your written guide link is dead
How can I connect to the containers I run from my host machine? for example my web server container? Thanks for the video
Wondering why not just use a Debian template at the beginning?
You had an older video where you specifically unchecked the 'Unprivileged container' option. What's changed with this video, why is 'unprivileged container' checked? Are you now able to run docker with unprivileged permissions without it affecting any services in containers?
Good question, Boris! It appears it's now working.
i try to install docker-compose inside LXC and when try to build container by command docker-compose up display this error
ERROR: for root_es01_1_821477422c1a Cannot start service es01: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:446: setting rlimits for ready process caused: error setting rlimit type 8: operation not permitted: unknown
I think the docker-compose not run under root permission ? how can solve this issue
great job very usefull !
Thanks for this video! I have portainer and docker running but it keeps telling me that there is an upgrade available. Is there a process to upgrade portainer in the LXI docker container? I followed the instruction on the portainer site and it broke it. I had to reinstall via your instructions to get it working again but am back to the older version.
How many CPUs do you recommend for the container? I will have small traffic going and low resources on my server so I dont want to overdue it.
DOCKER COMPOSE (easy install)
as root user ->
install commands:
apt-get update
apt-get install docker-compose-plugin
check command:
docker compose version
thanks, it s very well video
Is there anyone that can explain to me if there are any implication if you have created a LXC template in Proxmox 6 based on the previuos video from Geeked, using a privileged container without keyctl, and then using that to create containers in Proxmox 7?
Great technical video! I do have a question, I used this video and some others to create an LXC Docker Swarm, was pretty easy for a noob in this space! I got the swarm added in Portainer connected to the swarm manager (the default first install for swarm). I then did some research about how to "share" storage in the swarm, so that each node isn't independent. First question, do I need to even worry about this in a swarm? If so, in LXC it's not easy (if even possible in Proxmox 7+) to run NFS client and mount an NFS endpoint. I think it would be awesome to expand this video you did above with taking it further and possibly how to solve "shared" storage across a Swarm set of nodes....I know this is more than your video above ;-)
I’m just getting into Promox and I’m so glad I found your channel! I have one question. Do I install all my docker containers in this one LXC or I’d go through this step again and have multiple LXC for each of my docker containers?
You can have multiple docker containers inside the LXC one. However if you want to scale out (more resources), you are free to add more LXC hosts and also run Docker there.
confirmed working on 7.4-3
Thank you for the video sir. May I ask you a question? I'm having trouble when using HA on my containers. The problem is that It migrates the container, but the container won't start on another node because of the local pve that it was installed on the origin node. And I couldn't find a way to install the containers on my iSCSI shared drives. Is It possible to do?
Followed everything and worked, except last step, can't access portainer on the assigned IP:port, I get a connection reset error on browser.
Hey thanks for the Video. Trying to get to your page and i'm getting error 500s.
same
Looks like your page is working again. This is by far the easiest guide for setting up docker i've found.
this seems really good but at timestamp 3:53 you pasted a line and said it didn' and you would sort it... what did you do to sort it as it didn't work for me either??? #linuxnoob
for some strange reason when I want to access the portainer interface in the browser it tells me "***.***.***.*** sent an invalid response"
I've tested multiple ports to see if I was missing and double cheked the ip :p
thank you , very nice
All went well but docker never starts after a server reboot, I then have to reboot the container or manually start the docker service. any ideas?
systemd[1]: Dependency failed for Docker Application Container Engine.
Thank you!
I am a bit curious... You gave it 32 gig of space. What happens when I need to install a Microsoft SQL Server 2019 docker and want to give it 250g of space when there is only 32 gig available? There must be a way to map storage to a docker. Please explain as no one ever seems to. Thank you so much!
good Job bro. thanks
Can't find anything when I search 'core'. Turnkey Core not in the list. Why is that?
Open your proxmox shell and run "pveam update". That should update your template list.
How did you get that Black theme?
What does turnkey stand for? Is this build any different then classic debian lxc? Also, isn't running docker on lxc unsafe? Not trying to provoke anyone or anything, it's just something I heard and I don't understand why...
Can you either redo this video with Docker Compose, or post instructions on your website? I tried adding Compose, but it fails.
What command are you using?
@@selfhosted Guess my reply got borked by the mothership. I lost the UA-cam video that had shown up in a search result that may have resulted in the desired result. Ideally with the latest Docker Compose v2.2.3. I modified your install instruction with docker-ce and docker-ce-cli and added docker-comepose. It pulled v1.21.1.
How does the Xpenology Template run on PM 7
Does not show up under CT templates
Hi did exactly these steps, on proxmox 7.1-4 using turnkey-core 16.1-1. but after booting I cannot login using root
I tried multiple times creating a container with real simple password for root, but keep getting this error: "Login incorrect" this is driving me crazy
any ideas?
Why not alpine?
hey community!
Is that still relevant today I do mean 2023?
@Noted what do you exactly mean by saying:
Lower Resources by 80% Compared to VMs
Is that becasue you are using TurnKey Core as Containerized OS (LXC)?
Is there a reason to go with Turnkey over, let's say, Debian or Ubuntu?
Turnkey Linux has its place, but generally I would recommend using an Ubuntu (or Debian) server for Docker + containers
I'm using Proxmox 7.0-11 with ZFS. I created a Ubuntu 20.04 LXC container with "nesting" and "keyctl" features enabled. Then I installed Docker. It works but the disk space increase tremendously and then becomes unusable! Is there any solutions?
Is this happening without installing anything further? I've never seen this happen before with just docker alone installed. Could it be an app you installed via docker causing the issue? Let me know,
@@selfhosted Did know why my reply wasn't posted... anyway... thanks for your reply. Yes, I'm trying to install Dokku which uses Docker. Do you think the issue could be related to ZFS?
@@selfhosted Ubuntu LXC takes 2/3GB. Then, after installed Dokku, the space went to 10GB. Then, after push a Hello World app using Git, went to 20GB.
@@selfhosted Basically, the whole 20GB are on /var/lib/docker/vfs/dir/. I tried to use "docker system prune -a" but it didn't solve the problem.
@@KaMZaTa I saw the same issue with a debian LXC and Docker (Nextcloud, MariaDB, Treafik) on proxmox. It kept eating all my space in my LXC even when the dockers were just sitting idle. After a few days 30 GB. I switched to a VM with debian and the issue was gone.
Thank you.
Hello
I am new to proxmox
I am trying to change the name of the Container via command line .. Unfortunately I am not succeeding ... I need to do it by command line and not through the web interface ... and it is from the container itself ... Thanks
You would need to edit the container Host file then reboot.
Qual és lá línea de comando...?
@@systecservicos6275 First step is to find out the conatiner ID. Example: docker container ls --format "{{.ID}}: {{.Names}}: {{.Status}}"
That should show you something like a572804e9654 OldName
Now you run a command like docker container rename CONTAINER NEW_NAME, in this case
docker container rename a572804e9654 NewName
That should do the trick ...
Wow LXC is just a leightweight VM where we can run inside containers ? Not containers on proxmox host?
I think installing anything aside from Proxmox on the host itself is defeating the purpose of the whole idea. Why would anyone do that?
@@selfhosted so what is the problem running docker on lxc in proxmox ve 7
Not working for me. after following over and over again all the commands on apt update the docker line is not showing up. i guess i ditch proxmox and go back to unraid - way better
Hi. Thank you for this. Really interesting for a newb on Proxmox. I have been running all my Docker containers on a Synology NAS and want to move them to my new Proxmox sever. I see that the main concern with this method is the lack of pass through when using LXC containers. I am not sure what types of use cases I would need pass through for. Are you able to give me any examples of where pass through would be required/useful? Thanks again!
One would be passing through a GPU if you need it for Plex, Emby or Jellyfin. I never needed a GPU for encoding so this is never an issue for me. Smart home apps might need USB dongles and that's another example.
@@selfhosted Many thanks. I Now get what we mean by pass through. I too will not have the need for GPU on the docker containers.The only USB use case I can think of for me is if I move my PI4 Home Assistant over to Proxmox - If I do that I will use a VM specifically for it I think and then will have the USB available. Thanks again!
This is great, but very confused. Has this not been possible for a long time? Been running proxmox for at least 2 years now and each of my servers has at least one Debain LXC container that's nothing but a docker host with portainer installed to manage the docker stacks. Or is this just specific to the "turnkey core" LXC?
Installing docker in LXC for Proxmox 7 is different from 6.2. That's all.
@@selfhosted Got it, thanks!
What's the advantage to this? Is it worth the effort to migrate my Ubuntu VM docker host to this setup?
Honestly, if you have the resources, I’d stay on a VM. This is for people who have very little ram and cpu. The VM gives you better control over pass through.
@@selfhosted glad you mentioned pass through cause I have a few things passed through right now. Thanks!!
What a wonderful video! I am just planning to get into Proxmox. This looks like a great way to run Docker. Question. What limitations, if any, are there running Docker in a LXC container?
On a completely different note, do you run Home Assistant on Proxmox, and, if so, how? Container? VM? Thanks!
One of the biggest limitations with LXC is you can't use passthrough like you can with a VM. I would use a LXC for Home Assistant as I have in the past. It works very well.
@@selfhosted I was just about to ask if you knew how to passthrough a USB device. Apparently it can be done but so far I haven't been successful at it. Been searching everywhere for a guide that works.
Why use that bloated turnkey template instead of just plain Alpine, Debian or Ubuntu? And on that note - why use a container at all and not just install Docker directly on bare metal Proxmox? Saves resources, makes management a lot easier, especially storage/volumes, and isn't any less secure than granting keyctl access to a container. You get the ability to back up the container, but with Docker it's much easier to just back up the mounted volumes instead. So, why run Docker in LXC?
Oof. Docker on proxmox bare metal… to each his own.
Yeah, he could of used another linux container image. Result would have been about the same. Turnkey linux as the name suggests has a few things pre-config'd for container use. Check their site out, they give details on the specific tweaks they do.
As for your second question it's unsupported and bad practice to fck around with the hypervisor. The hypervisor should be rock solid / stable because if that goes down it takes everything with it. In production you would never run an unsupported config, you don't know what trouble you're going to run into and you will be refused help form the vendor. Home use you do you.
alias sudo=
typing the above command first helps all the copied sudo commands to work as is
This is not working for me.
nvm, the script worked.
i've been running this for some time now and this setup is really slow, it has insanely high io latency all caused by the VFS storage driver that is being used by docker
edit: Solution: create and mount an XFS zvol in LXC
(Intel660p is the pool that im using, (default is local_lvm), and docker_lxc_300 is the volume that im creating)
(on host)
zfs create -s -V 30G Intel660p/docker_lxc_300
mkfs.xfs /dev/zvol/Intel660p/docker_lxc_300
(the volume should be sparse so it should only take up as much space as it is actually being used, 30gb being the max, but given it is an XFS volume it is possible to expand it)
set the right permissions within the filesystem to match the root user in the unprivileged lxc container, should be mapped to 100000 by default
mkdir /tmp/zvol_tmp
mount /dev/zvol/Intel660p/docker_lxc_300 /tmp/zvol_tmp
chown -R 100000:100000 /tmp/zvol_tmp
umount /tmp/zvol_tmp
(in lxc)
finally, if adding to a container that already has docker installed, back it up then completely uninstall docker and be sure to remove /var/lib/docker (rm -rf /var/lib/docker),
(on host)
then finally, on the host, edit /etc/pve/lxc/.conf (nano /etc/pve/lxc/300.conf) and add: (change mp0 to mp1 ,etc if thats already being used)
mp0: /dev/zvol/Intel660p/docker_lxc_300,mp=/var/lib/docker,backup=0
finally boot up the lxc and install docker again
cons: snapshots do not work in this configuration, however backups do but they do not include /var/lib/docker, but they will backup any docker bind mounts which is what's important, to restore any given backup you will have to sort out docker each time, get it working then you can redeploy your containers using the same bind mounts
alternatively I have read that it is also possible to use ext4 instead of xfs (mkfs.ext4 /dev/zvol/Intel660p/docker_lxc_300 ,and the rest is the same as above) to get the snapshots working, though i have not tried that but that will come with the disadvantage of being unable to expand that volume
Important to know that if you are like me who started with Proxmox today Apr 2023 and the version is 7.4-3 there is absolutely no Turnkey Core at all in the templates. As a matter of fact comparing the tiny template list my proxmox is showing comparing it with other videos they definitely removed a ton of stuff. I just tried downloading turnkey core from the web and then upload it as a template but the damn proxmox don’t like it either saying that is a “wrong extension”. No much luck on my first day with proxmox, I think I may go back to esxi 😂
pveam update
Angel, see @tertius comment. Need to run pveam update to get an updated list.
bruh I had already pressed enter and then you say no don't do that.
I would have found this video more useful if you had started by explaining WHY we would want to do things this way.
Crytal clear..
Make sure your LXC storage isn't on ZFS. You'll run into problems, otherwise. Actually, docker in a Proxmox LXC is a bad idea, but people never listen, so...
Can you explain why it's a bad idea? Other than the ZFS issue.
What's wrong with running LXCs on ZFS (specifically with thin provision enabled)?
"deh-be-an" not "dee-be-an"