Skip to content

A Python program to manage the execution of software within Docker containers on a single machine.

License

Notifications You must be signed in to change notification settings

Rick-Houser/Whale_Watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Whale_Watcher

A rudimentary Python tool used to manage the execution of software within Docker containers on a single machine. This is done in an encapsulated manner, allowing multiple containers to be run simultaneously and independently. See ARCHITECTURE.md for my thoughts on tradeoffs when implementing this tool under a 3 hour time constraint.

Requirements:

  1. Accept a bash command.
  2. Launch a Docker container to run the command.
  3. Collect logs real-time (STDOUT/STDERR) while the command runs.
  4. The logs should be saved and identifiable in a logs directory.
  5. Clean up when the command finishes and handle expected failures.
  6. Have the ability to stop a specified container (without losing any logs).

Usage

  • Make the file executable
chmod +x <script_name>
  • Run some command inside a container
./script_name -r 'my command'
  • To have more control over bash and run longer commands
./script_name -b 'my super long command with -options'
  • To stop a specified container
./script_name stop 'container_name_or_id'
  • To kill a container
./script_name kill 'container_name_or_id'

About

A Python program to manage the execution of software within Docker containers on a single machine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages