Skip to content

Instantly share code, notes, and snippets.

@technorabilia
technorabilia / portainer_start_container.sh
Created May 14, 2021 18:06
Start container using Portainer API
BASE_URL='192.168.0.115:9000'
USERNAME='admin'
PASSWORD='mypassword'
ENDPOINT_ID="myendpoint"
CONTAINER_ID="mycontainer"
JWT=$(
curl --silent --location --request POST "$BASE_URL/api/auth" \
--header "Content-Type: application/json" \
--data-raw "{
@technorabilia
technorabilia / portainer_update_template_url.sh
Last active April 11, 2022 07:34
Update Portainer App Templates URL using Portainer API
BASE_URL='192.168.0.115:9000'
USERNAME='admin'
PASSWORD='mypassword'
TEMPLATES_URL='https://raw.githubusercontent.com/portainer/templates/master/templates-2.0.json'
JWT=$(
curl --silent --location --request POST "$BASE_URL/api/auth" \
--header "Content-Type: application/json" \
--data-raw "{
\"password\": \"$PASSWORD\",