23 lines
623 B
Bash
23 lines
623 B
Bash
#!/bin/bash
|
|
###################################
|
|
############ by Sthope ############
|
|
###################################
|
|
|
|
#### USAGE
|
|
# bash -c "$(wget -qLO - https://git.sthope.dev/sthope/docker_portainer_stacks/raw/branch/master/portainer/install-portainer-agent)" EDGE_ID EDGE_KEY
|
|
#
|
|
|
|
sudo docker run -d \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
|
|
-v /:/host \
|
|
-v portainer_agent_data:/data \
|
|
--restart always \
|
|
-e EDGE=1 \
|
|
-e EDGE_ID=${1} \
|
|
-e EDGE_KEY=${2} \
|
|
-e CAP_HOST_MANAGEMENT=1 \
|
|
--label=hide_container=true \
|
|
--name portainer_edge_agent \
|
|
portainer/agent
|