/godocker

Simple container implementation from scratch in Go

Primary LanguageGo

Simple container from scratch in Go

To run a single commad inside the container

go run main.go run <command>

To open terminal inside container

go run main.go run /bin/bash

This container does not support images, so we must manually create an ubuntu file system for usage by the container, and set is as root

Steps to create an empty filesystem using Docker

docker run -d --rm --name ubuntufs ubuntu sleep 1000
docker export ubuntufs -o ubuntufs.tar
docker stop ubuntufs
tar xf ubuntufs.tar -C <location of container root>