mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-14 23:47:12 +00:00
[ACME, Watchdog, DockerAPI] Use only limited Docker API
This commit is contained in:
1 parent
3ae0b16845
commit
ef9953898c
4 files changed
+16
-12
No files matched your search
@@ -41,6 +41,14 @@ class container_post(Resource):
|
||||
return 'Error'
|
||||
else:
|
||||
return 'OK'
|
||||
elif post_action == 'restart':
|
||||
try:
|
||||
for container in docker_client.containers.list(all=True, filters={"id": container_id}):
|
||||
container.restart()
|
||||
except:
|
||||
return 'Error'
|
||||
else:
|
||||
return 'OK'
|
||||
else:
|
||||
return jsonify(message='Invalid action')
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user