Docker
Portainer API Setup
To allow Portainer to add an environment. Docker must be configured to open the port for remote access. The firewall must also allow this port. Below is for no TLS.
Edit:
nano /lib/systemd/system/docker.service
Add the line and comment out the other ExecStart line.
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
Reload systemctl after the change
systemctl daemon-reload
Add fire exception (RHEL)
firewall-cmd --zone=public --add-port=2375/tcp --permanent
firewall-cmd --reload
Restart the service
systemctl restart docker.service
Portainer Enviroment Configuration
On the left side menu of Portainer click on the environment tab to add a new environment.
Under Enviroment type click on Docker
Fill out the name and the "Environment URL" as follows
We are not using TLS on this, since it is not a production setup so we can skip it.