302Portainer - amagerard/Docker GitHub Wiki
Docker/Home
Zimaos.
1-Zimaos | 2- Portainer | 3- Drupal | 4- Joomla | 5-Wordpress |
---|---|---|---|---|
6-Xwiki | 7- Mediawiki | 8- Httpd | ||
Docker | Casaos |
2. Portainer.
As it is written on the official website https://www.portainer.io/
Portainer is effortless container management for Docker.
But it's not free.
Home & Student license cost $149/year.
Fortunately there is a free community version Portainer CE.
https://docs.portainer.io/start/install-ce/server/docker
This procedure is based on this example.
Zimaos ip : 192.168.60.9/24
Zimaos version: 1.3.1-beta1
2.1 Install.
Open Zimaos.
http://192.168.60.9
.
Open App Store.
Search Portainer.
Choose Portainer (Portainer) .
Click on.
Cust50 / 5 000
You have arrived in the installation settings.
Web ui.
Replace https
by http
.
Replace 9443
by 9000
.
Install.
Open Portainer.
Click on Portainer icon.
http://192.168.60.8:9000
.
Default username is: admin
.
Password (12 characteres) : as you want
.
Create User.
Click on Get Started
.
Environments.
Click on local
.
At the left you have:
- Containers ( only
Start - Stop - Edit - Remove
). - Images (only
Remove
). - Networks (only
Add - Remove
). - Volumes ( only
Add - Remove
).
2.2 How to use portainer.
I use the Portainer application only for:
- start, stop, edit, remove a container.
- remove Images.
- create or remove networks.
- create or remove volumes.
2.3 Naming convention.
This is my naming agreement.
If you have several containers, it's very difficult for me to navigate.
2.3.1 Containers' name.
The name will be of the form cnt_ [app] _ [type] _ [number]
Example:
Drupal needs the drupal and mariadb container.
App gives dpl
(3 Characters) for Drupal.
Type gives wb
for HTML and db
for database.
Number is instance 1 for drupal.
cnt_dpl_wb_1
is container 1 for Drupal html.
cnt_dpl_db_1
is container 1 for Drupal database.
The 2 containers number 1 are together.
2.3.2 Networks'name.
The default network is bridge.
The issue is that all containers will be on the same network.
I chose to create a network for each container that will be together.
The name will be of the form net _ [app] _ [number]
Example:
Drupal needs a network.
App gives dpl
(3 characters) for Drupal.
Number is instance 1 for Drupal.
net_dpl_1
is the network for Drupal.
2.3.3 Volumes'name.
The volume is the place where is stored:
- html
- database
By default the volumes are created on:
/var/lib/docker/volumes
The name will be of the form vol_ [app] _ [type] _ [number]
Example:
Drupal needs the drupal and mariadb volume.
App gives dpl
(3 characters) for Drupal.
Type gives wb for html and db for database.
Number is instance 1 for drupal.
vol_dpl_wb_1
is container 1 for Drupal html.
vol_dpl_db_1
is container 1 for Drupal database.
The 2 containers number 1 are together.
2.4 Container logs.
Open Portainer.
In my example,Docker IP server is 192.168.60.9
.
http:192.168.60.9:9000
Click on local Environments.
At the left, you have :
- Containers.
- Images.
- Networks.
- Volumes.
Select Container.
Choose your container.
Example : cnt_wps_wb_1
You have "Quick Actions" with 5 items.
- logs
It's for me. - inspect
For advanced users. - stats
For stats lovers. - exec Console
Don't use. - Attach console
Don't use.
The logs, give you messages when everything is going wrong or when everything is going well.
Example:
- for a web type container, you have when everything goes well.
Command line: 'apache2 -D FOREGROUND'
- for a db type container, you have when everything goes well.
socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution