in

How to Install Docker and Portainer in a Promox 7 LXC Container

In this article, we will install Docker and the Portainer on an LXC container in Proxmox 7.

This is the Docker script found on the official docker installer website.

To Install Docker

First, you need to update and upgrade the container packages.

apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Use the following command to set up the stable repository.

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

Update the apt package index, and install the latest version of Docker Engine and container.

apt-get install docker-ce docker-ce-cli containerd.io

Then you need to verify docker is running on the system.

systemctl status docker

If everything is done correctly, docker should be running.

To Install Portainer

docker run -d \
--name="portainer" \
--restart on-failure \
-p 9000:9000 \
-p 8000:8000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest

After installation, run the command below to get the Portainer IP address.

ip addr

Add Portainer port 9000 to the end of the IP address to access Portainer GUI.

----------

If you liked this article, please subscribe to our YouTube Channel for tech news, reviews and video tutorials. You can also find us on Twitter, Instagram and Facebook.

One Comment

Leave a Reply
  1. i like how you append your website to every line of code that we are supposed to copy and paste into the terminal. what a waste of time and effort for all involved. thanks for nothing

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

unexpected error occurred

How To Fix “unexpected error occurred while signing in to your account for Xbox Live” error in Fortnite

How to Quickly Upgrade Portainer in Docker