Skip to content

Instantly share code, notes, and snippets.

@TopperBG
Last active October 26, 2023 12:17
Show Gist options
  • Save TopperBG/bf4fabd9c258e0a81ae2c67ac4579dba to your computer and use it in GitHub Desktop.
Save TopperBG/bf4fabd9c258e0a81ae2c67ac4579dba to your computer and use it in GitHub Desktop.
Run/restart docker container with API post (PMM example)
#!/bin/bash
curl -X POST --unix-socket /var/run/docker.sock -H "Content-Type: application/json" "http:/v1.41/containers/create?name=pmm-temp" -d '{
"Image": "meisnate12/plex-meta-manager",
"Cmd": ["--overlays", "--run", "-ig", "--ignore-schedules", "--no-missing"],
"HostConfig": {
"Binds": ["/root/docker/etc/plexmetamanager:/config"],
"AutoRemove": true
}
}'
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment