IT/Software/Portainer: Difference between revisions

From msgwiki
< IT‎ | Software
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
= Portainer =
=== General ===
Web UI for Docker and Docker Compose.
=== Installation ===
==== Manually ====
* https://docs.portainer.io/start/install-ce/server/docker/linux
==== Ansible Playbook ====
* [[IT/Software/Ansible#Execute Playbooks|how to run playbooks]]
* ssh enabled on host <code>sudo apt update && sudo apt install openssh-server -y</code>
* https://github.com/stefannyffenegger/automation/blob/main/ansible/pb_prompt_install-portainer.yml
==== Offline Manually ====
Setup Portainer
Setup Portainer
Now that Docker and Docker Composer are installed, follow the steps below to get Portainer setup.
Now that Docker and Docker Composer are installed, follow the steps below to get Portainer setup.
Line 6: Line 25:
To get the server installed, run the commands below.
To get the server installed, run the commands below.


cd ~/
<code>cd ~/</code>
docker volume create portainer_data
<code>docker volume create portainer_data</code>
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
<code>docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer</code>


You’ll just need to access the port 9000 of the Docker engine where Portainer is running using your browser.
You’ll just need to access the port 9000 of the Docker engine where Portainer is running using your browser.
Line 39: Line 58:


Click on the program you want to install, click on deploy, wait a few seconds and your program is running.
Click on the program you want to install, click on deploy, wait a few seconds and your program is running.
To update portainer, use the following commands:
<code>sudo docker stop portainer</code>
<code>sudo docker rm portainer</code>
<code>sudo docker pull portainer/portainer-ce:latest</code>
<code>sudo docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest</code>
=== Alternatives ===
* Dockge (new project)

Latest revision as of 13:35, 18 May 2024

Portainer

General

Web UI for Docker and Docker Compose.

Installation

Manually

Ansible Playbook

Offline Manually

Setup Portainer Now that Docker and Docker Composer are installed, follow the steps below to get Portainer setup.

You can use Docker command to deploy the Portainer Server; note the agent is not needed on standalone hosts, however, it does provide additional functionality if used.

To get the server installed, run the commands below.

cd ~/ docker volume create portainer_data docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

You’ll just need to access the port 9000 of the Docker engine where Portainer is running using your browser.

After a successful pull, you should get a similar message as below:

latest: Pulling from portainer/portainer d1e017099d17: Pull complete a7dca5b5a9e8: Pull complete Digest: sha256:4ae7f14330b56ffc8728e63d355bc4bc7381417fa45ba0597e5dd32682901080 Status: Downloaded newer image for portainer/portainer:latest 2fd5f4a0883a9d358ad424fd963699445be8839f3e6a2cf73d55778bcc268523 At this point, all you need to do is access Portainer portal to manage Docker. Open your web browser and browse to the server’s hostname or IP address followed by port #9000

http://localhost:9000 You should get Portainer login page to create an admin password.

Submit a new password.

Now you see some options to choose the environment you want to manage.

Since we installed Docker on the same machine, select to connect and manage Docker locally.

You’ll be directed to Portainer dashboard where you can start managing Docker. Browse around and begin setting up your environment. If you had Docker installed on a remote computer, you’ll have to install Portainer agent on the server.


Once signed in you need to go to settings. Under the heading App Template you will see URL. Paste the following URL in there: https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/master/Template/portainer-v2.json

Now you can click on App Templates on the left site of the screen just below dashboard.

Click on the program you want to install, click on deploy, wait a few seconds and your program is running.

To update portainer, use the following commands:

sudo docker stop portainer

sudo docker rm portainer

sudo docker pull portainer/portainer-ce:latest

sudo docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

Alternatives

  • Dockge (new project)