Running A Docker Host in a Proxmox VE LXC Linux Container (CT)

Channel:
Subscribers:
14,400
Published on ● Video Link: https://www.youtube.com/watch?v=q98XUBf2YO4



Duration: 3:46
2,158 views
44


#Proxmox #Docker #LXC

Full steps can be found at https://i12bretro.github.io/tutorials/0595.html

--------------------------------------------------------------------
Creating the Container
--------------------------------------------------------------------
   01. Log into the Proxmox VE web UI
   02. Select a storage device from the left navigation that allows storing Container templates
   03. Select CT Templates from the left sub-navigation menu
   04. Click the Templates button
   05. Search for core ≫ Click TurnKey Core to select it ≫ Click the Download button
   06. After the download completes, close the download dialog
   07. Right click the Proxmox node name ≫ Create CT
   08. Enter the Hostname Docker, Password and Confirm the password ≫ Next
   09. Select the Storage where the container template was downloaded and select the TurnKey Core container template ≫ Click Next
   10. Set the Storage device to save the container to ≫ Click Next
   11. Leave the defaults on the CPU tab ≫ Next
   12. On the Memory tab, set the Memory to 2048 ≫ Next
   13. Leave the defaults on the Network tab, setup a static IP address if needed (I prefer to set this from my router) ≫ Next
   14. Leave the defaults on the DNS tab ≫ Next
   15. Verify the summary and click Finish
   16. After the container creation completes, close the download dialog
   17. Right click the Docker LXC container in the left navigation pane ≫ Start
   18. Click console in the left sub-navigation menu
 
--------------------------------------------------------------------
Installing Updates and Docker
--------------------------------------------------------------------
   01. Log into the container with the username root and the password set during the setup
   02. On the Initialize Hub services dialog, press tab and select Skip ≫ Press Enter
   03. On the System Notifications dialog, press tab and select Skip ≫ Press Enter
   04. On the Security updates dialog, press tab to select Install to enable automatic updates or Skip ≫ Press Enter
   05. Press Enter to select Advanced Menu
   06. Arrow down and select Quit ≫ Press Enter ≫ Select Yes to confirm ≫ Press Enter
   07. Run the following commands to install updates
         # update software repositories
         apt update
         # install available software updates
         apt upgrade -y
         # clean apt cache
         apt clean
         # reboot the container
         reboot now
   08. Log back into the container
   09. Run the following commands to install Docker
         # install prerequisites
         apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
         # add docker gpg key
         curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | apt-key add -
         # add docker apt repository
         add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
         # update software repositories
         apt update
         # install docker
         apt install docker-ce docker-compose containerd.io -y
   10. Welcome to your LXC Docker host
   11. At this point you can use docker run and docker-compose to run containers from the terminal
 
Documentation:  https://docs.docker.com/engine/reference/commandline/docker/
 
--------------------------------------------------------------------
Optionally Install Portainer (Recommended)
--------------------------------------------------------------------
Portainer is an open source tool for managing container-based software applications in Kubernetes, Docker, Docker Swarm, Azure ACI and edge environments.
It can be used to set up and manage environments, deploy applications, monitor app performance and triage problems. It is used by software engineers, devops and infrastructure teams all over the world to simplify processes, reduce risk and streamline operations.
 
   01. Run the following commands to start a Portainer container in Docker
         # create a working directory for portainer
         mkdir ~/docker/portainer_data -p
         # run the portainer container
         docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v ~/docker/portainer_data:/data portainer/portainer-ce
         # output the ip docker host address
         ip addr
   02. Open a web browser and navigate to http://DNSorIP:9000
   03. Set an administrator username and password ≫ Click Create user
   04. Click the Docker - Manage the local Docker environment option ≫ Click Connect
   05. Welcome to Portainer, Docker container management from a web browser
 
Documentation:  https://www.portainer.io/installation/
 


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
Proxmox Docker Host
Install Docker Host
Docker Host VM
Proxmox Docker VM
Docker Made Easy
Proxmox VE
Hypervisor
Docker
LXC
Linux Container
Linux
Proxmox
Debian
Home Lab
Virtual Machine
Install Guide
VM
Self-Hosted
Containerization
Proxmox Docker
How To
Tutorial
i12bretro