Skip to content

Containerization daemon application using UNIX namespaces and control groups

Notifications You must be signed in to change notification settings

redn1nja/mydocker

Repository files navigation

mydocker

Authors (team):

Prerequisites

g++, cmake, boost
Python: keyboard, sys, socket

Compilation

./compile.sh

Usage example

  1. Run docker daemon (./mydocker <port>):
    ./bin/mydocker 8000

  2. Start client (python3 test_socket/client.py <port>):
    python3 test_socket/client.py 8000

  3. Communication loop
    Specify the container in the dockerfile (.json). For example:

    {
     "bin" : "/bin/sh",
     "args" : [],
     "mount_points" : ["/tmp"],
     "mem_limit": 200,
     "pids_limit": 20
    }
    
    mydocker >>> create dockerfiles/mydockerfile.json
    mydocker >>> run 0
    mydocker >>> listen 0
    

Communication with docker daemon

  • create container from docker file:
    create <path-to-dockerfile>
    
  • run the container:
    run <index>
    
  • start listening to the container. If the --input flag is specified - the program requires input; otherwise, it doesn't:
    listen <index> [--input]
    
  • detach from the container the client is currently listening:
    detach
    
  • print the information about the existing containers:
    list_containers
    
  • kill the container:
    kill_container <index>
    
  • stop the client:
    exit
    

Implementation details

mydocker
mydocker (1)

About

Containerization daemon application using UNIX namespaces and control groups

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •