Skip to content

hpedrorodrigues/docker-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny "docker run" implementation

An extremely simple implementation of "docker run" command to help me learn more about docker internals.

This project basically can pull an image from Dockerhub and execute commands in it. During this process, it uses chroot, kernel namespaces and the Docker registry API.

This project was inspired by the Docker challenge of CodeCrafters.

And based on Docker registry API docs:

Running this project

You can run this project using the run.sh script

e.g.

./run.sh run ubuntu:latest ls -la .

Or you can use the Dockerfile available in the root directory

e.g.

docker build -t tiny-docker . \
  && docker run --cap-add='SYS_ADMIN' tiny-docker run ubuntu:latest ls -la .

Note: The `--cap-add='SYS_ADMIN' flag is required to create PID Namespaces.

About

A straightforward implementation of the "docker run" command to help me learn more about how docker works under the hood.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published