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:
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.