Python Forum
shutdown host from docker container
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
shutdown host from docker container
#1
Lightbulb 
Hello, I am trying to shutdown and reboot my LINUX devices from a python script that runs in a docker container, this code I was using pre-dockerizing the script is not working anymore, how can I solve this?
os.system("shutdown now")
os.system("reboot now")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  uploading files from a ubuntu local directory to Minio storage container dchilambo 0 469 Dec-22-2023, 07:17 AM
Last Post: dchilambo
  Upload Files to Azure Storage Container phillyfa 6 710 Dec-22-2023, 06:11 AM
Last Post: Pedroski55
  Os.system("shutdown"); command not found cosmin1805 4 1,697 Nov-13-2022, 02:07 PM
Last Post: cosmin1805
  networkx package is not visible in singularity container image erdemath 11 2,300 Oct-14-2022, 12:04 PM
Last Post: Larz60+
  Issue in Starting Django project with Docker Prabakaran141 0 831 Sep-26-2022, 12:15 PM
Last Post: Prabakaran141
  python installation/running inside singularity container erdemath 2 1,808 Sep-21-2022, 08:13 AM
Last Post: erdemath
  Python in Singularity Container on Ubuntu erdemath 0 913 Aug-31-2022, 02:17 PM
Last Post: erdemath
  Docker -building a python image saisankalpj 5 3,958 Jul-13-2022, 12:53 PM
Last Post: saisankalpj
  where to host my python script tomtom 1 1,269 Feb-09-2022, 06:45 AM
Last Post: ndc85430
  Failing to connect to a host with WMI tester_V 6 4,390 Aug-10-2021, 06:25 PM
Last Post: tester_V

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020