These are some guides for various use.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.4 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. # Portainer
  2. ## Setup Server
  3. ### Docker
  4. The official container and documentation was made by [portainer](https://hub.docker.com/r/portainer/portainer).
  5. #### Volumes
  6. Set the following volumes with the -v tag.
  7. | Volume-Name | Container mount | Description |
  8. | ---------------------- | ---------------------- | ------------------------------------------------- |
  9. | `portainer` | `/data` | configuration directory |
  10. | `/var/run/docker.sock` | `/var/run/docker.sock` | connection to local docker containers and volumes |
  11. #### Ports
  12. Set the following ports with the -p tag.
  13. | Container Port | Recommended outside port | Protocol | Description |
  14. | -------------- | ------------------------ | -------- | ----------- |
  15. | `9000` | `9000` | TCP | WebUI |
  16. #### Rebuild
  17. ```shell
  18. #!/bin/sh
  19. docker stop portainer
  20. docker rm portainer
  21. docker pull portainer/portainer:latest
  22. docker run --name portainer \
  23. --restart unless-stopped \
  24. -p 9000:9000 \
  25. -v /var/run/docker.sock:/var/run/docker.sock \
  26. -v portainer:/data \
  27. -d portainer/portainer
  28. ```
  29. ## Setup Agent
  30. ### Docker
  31. The official container and documentation was made by [portainer](https://hub.docker.com/r/portainer/agent).
  32. #### Volumes
  33. Set the following volumes with the -v tag.
  34. | Volume-Name | Container mount | Description |
  35. | ------------------------- | ------------------------- | -------------------------------------- |
  36. | `/var/run/docker.sock` | `/var/run/docker.sock` | connect your running docker containers |
  37. | `/var/lib/docker/volumes` | `/var/lib/docker/volumes` | connect running docker volumes |
  38. #### Ports
  39. Set the following ports with the -p tag.
  40. | Container Port | Recommended outside port | Protocol | Description |
  41. | -------------- | ------------------------ | -------- | -------------------- |
  42. | `9001` | `9001` | TCP | Portainer agent port |
  43. #### Rebuild
  44. ```shell
  45. #!/bin/sh
  46. docker stop portainer_agent
  47. docker rm portainer_agent
  48. docker pull portainer/agent:latest
  49. docker run --name portainer_agent \
  50. -p 9001:9001 \
  51. --restart unless-stopped \
  52. -v /var/run/docker.sock:/var/run/docker.sock \
  53. -v /var/lib/docker/volumes:/var/lib/docker/volumes \
  54. -d portainer/agent:latest
  55. ```