https://github.com/lizrice/containers-from-scratch
Writing a container in a few lines of Go code, as seen at DockerCon 2017 and on O'Reilly Safari
https://github.com/lizrice/containers-from-scratch
cgroups containers go golang namespaces
Last synced: about 1 month ago
JSON representation
Writing a container in a few lines of Go code, as seen at DockerCon 2017 and on O'Reilly Safari
- Host: GitHub
- URL: https://github.com/lizrice/containers-from-scratch
- Owner: lizrice
- License: mit
- Created: 2017-04-19T00:15:35.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-15T15:06:48.000Z (over 2 years ago)
- Last Synced: 2025-04-01T08:42:52.969Z (about 2 months ago)
- Topics: cgroups, containers, go, golang, namespaces
- Language: Go
- Homepage: http://lizrice.com
- Size: 5.86 KB
- Stars: 1,828
- Watchers: 41
- Forks: 320
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - containers-from-scratch
README
# containers-from-scratch
Writing a container in a few lines of Go code, as seen at [DockerCon 2017](https://www.youtube.com/watch?v=MHv6cWjvQjM&t=1316s) and on [O'Reilly Safari](https://www.safaribooksonline.com/library/view/how-to-containerize/9781491982310/)You need root permissions for this version to work. Or you can adapt it to be a rootless container by as shown in [these slides](https://speakerdeck.com/lizrice/rootless-containers-from-scratch).
Note that the Go code uses some syscall definitions that are only available when building with GOOS=linux.