Choosing a template for your LXC
- click on your local drive in Proxmox and click on CT Templates on the right pane.
- I like to use Ubuntu-22.04-standard bet you are free to use what your like some will not work click on download and we are ready here.
- Alway test this first under a new Proxmox installation or a test machine!!
Making the Proxmox LXC container.
- Click create CT to make a new container and follow the below examples the hostname can be what you want and remember the password you give it >>>> Next.
- Select the CT Template you just uploaded >>>> Next.
- Select the disk you want to use for your container the size you choose what you want, But REMEMBER you can always make it bigger but not smaler >>>> Next.
- For the CPU choose minimum 2 cores and Memory 4096 will be sufficient you can always change it later. For the Network you choose DHCP and next until you created the Container.
- Check the settings bellow >>>> Finish
Starting up your container and installing docker.
- select console and click start the container should boot up login with ROOT and your password you typed in before.
- First we are going to update our container wit he following command
apt update && apt upgrade -y
Install Docker and Docker Compose
- Copy and past the following code inside the console
apt install docker.io curl -y
curl -SL https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
- Portainer is an open-source management tool that allows users to easily manage their Docker environments. It provides a simple and intuitive web-based user interface for managing Docker containers, images, networks, and volumes, as well as the ability to deploy and manage stacks. Portainer also has built-in support for managing multiple Docker environments, making it a useful tool for both development and production environments.
- Copy again the code below to install Portainer.
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
- Thats it now we have to lookup the IP address so you can open portainer in a browser window
- Type Clear to clear the console and type “ip a” to list your current network configuration see below.
- Open a new browser window and type in the following address : Https:// <your IP> :9443 you will see the following screen, put in a new user and password and click Create User.
- You are now logged in to your Portainer see below.
Thats it you are now ready to deploy some more docker containers inside a Proxmox LXC
The following links will help you on your way
Docker Hub a repository of 1000+ docker programs