https://github.com/willdurand/containers
📦 This is a repository with some code I wrote to learn more about containers.
https://github.com/willdurand/containers
containers educational-project
Last synced: over 1 year ago
JSON representation
📦 This is a repository with some code I wrote to learn more about containers.
- Host: GitHub
- URL: https://github.com/willdurand/containers
- Owner: willdurand
- License: apache-2.0
- Created: 2022-06-04T12:24:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T21:15:54.000Z (over 3 years ago)
- Last Synced: 2025-03-24T23:27:20.468Z (over 1 year ago)
- Topics: containers, educational-project
- Language: Go
- Homepage: https://williamdurand.fr/2022/06/21/deep-dive-into-containers/
- Size: 396 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# containers
[](https://github.com/willdurand/containers/actions/workflows/ci.yml)
This is a repository with some code I wrote to **learn** more about containers. It currently contains:
- [`yacr`](./cmd/yacr/README.md): a container runtime that implements the [runtime-spec][]
- [`yacs`](./cmd/yacs/README.md): a container shim with an (HTTP) API
- [`yaman`](./cmd/yaman/README.md): a container manager that leverages the two previous tools
- [`microvm`][microvm]: a container runtime that uses micro Virtual Machines (VMs)
For more information, please refer to the documentation of each sub-project.
[](https://asciinema.org/a/vdC2zxvyHSubTHuAPDt3g2T21)
Want to give it a quick try? [Open this project in Gitpod](https://gitpod.io/#https://github.com/willdurand/containers)!
## Building this project
This project requires a Linux environment and the following dependencies:
- `fuse-overlayfs` for rootless containers
- `uidmap` for rootless containers
- `slirp4netns` for the network layer (rootfull and rootless containers)
- `bats`, `netcat`, `jq` and `runc` for the integration tests
- `tap` (or `node-tap`) for the OCI comformance tests
For the [`microvm`][microvm] runtime, this project also requires:
- `bison`, `flex`, `libelf-dev` to build the Linux kernel
- `qemu-system`
You should either use Gitpod as mentioned in the previous section or [Vagrant][]. It might not be a good idea to run this project on your actual machine.
The easiest and quickest way to get started is to build all sub-projects:
```console
$ make all
$ sudo make install
```
Optional step: run `sudo make install_completion` to enable `bash` auto-completion.
### Vagrant
This project can be used with [Vagrant][] to set up a Linux virtual machine. This is recommended as opposed to trying out the different tools on your actual Linux system.
```console
$ vagrant up && vagrant ssh
```
From there, you can `cd /vagrant` and follow the instruction to build the project (previous section).
### bash auto-completion on Linux
You can also enable completion for `yacr` and `yaman`.
You must have the `bash-completion` package installed first and you should possibly source `/usr/share/bash-completion/bash_completion` in your bash configuration (`~/.bashrc`). When `type _init_completion` in your shell returns some content, you're all set.
You can now install the completion files:
```console
$ sudo make install_completion
```
After reloading your shell, `yacr` and `yaman` autocompletion should be working.
## License
See [`LICENSE.txt`](./LICENSE.txt)
[runtime-spec]: https://github.com/opencontainers/runtime-spec
[vagrant]: https://www.vagrantup.com/
[microvm]: ./cmd/microvm/README.md