Skip to content

Portainer

reubenajohnston edited this page Mar 2, 2024 · 2 revisions

Portainer install

  1. From attack VM, perform the steps listed below:
    $ 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
    
  2. In all the other VMs, install the portainer agent by creating a new portainer agent container in each VM:
    $ docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v
    

/var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent ```

  1. Open the portainer gui from a browser in your attack VM (url is https://localhost:9443/#!/auth) and specify credentials
  2. Add each of the remote agents using the portainer gui
    1. From the menu select Environments then click Add environment
    2. Select Docker Standalone as the environment type then click Start Wizard.
    3. Select the Agent option, then your environment type
    4. Use the main ethernet (one for NAT) IP address and the port specified when creating the agent container above (e.g., 192.168.11.130:9001) and connect

Useful links