27 lines
893 B
Bash
27 lines
893 B
Bash
#!/bin/bash
|
|
###################################
|
|
############ by Sthope ############
|
|
###################################
|
|
|
|
#### USAGE
|
|
<<<<<<< HEAD
|
|
# bash -c "$(wget -qLO - https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/raw/branch/master/portainer/install-portainer-agent)" EDGE_ID EDGE_KEY
|
|
=======
|
|
# bash -c "$(wget -qLO - https://git.sthope.dev/sthope/sthope-examples/raw/branch/master/docker_portainer_stacks/portainer/install-portainer-agent)" EDGE_ID EDGE_KEY
|
|
>>>>>>> ec2f9d52c1c5cdfbb0c70f0e6d62b0bd872e37e7
|
|
#
|
|
|
|
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
|