TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Bocker: Docker implemented in around 100 lines of Bash (2015)

315 pointsby begoonover 2 years ago

21 comments

dangover 2 years ago
Related:<p><i>Bocker – Docker implemented in around 100 lines of Bash (2015)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22244706" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22244706</a> - Feb 2020 (196 comments)<p><i>Docker implemented in around 100 lines of bash</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16453610" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16453610</a> - Feb 2018 (9 comments)<p><i>Show HN: Bocker – Docker implemented in 100 lines of bash</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9925896" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9925896</a> - July 2015 (87 comments)
smoldesuover 2 years ago
Liz Rice&#x27;s presentation on re-creating Docker in Go is also quite eye-opening: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Utf-A4rODH8" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Utf-A4rODH8</a>
评论 #33218803 未加载
ajrossover 2 years ago
Really this is more interesting as a great tutorial on the way Linux container tools work (and especially their fundamental simplicity -- the docs make them seem scary when they really aren&#x27;t) more than it is as a docker replacement (docker is obviously much larger than this one script, but not really &quot;large&quot; as a software stack).<p>But reading this makes clear that, yes, containers are just filesystem trees, network namespaces are just like internal networks maintained by straightforward commands underneath an &quot;ip netns&quot; command, etc...<p>Great stuff.
n4bz0rover 2 years ago
Woah! Don&#x27;t know if it can be used as a proper Docker replacement (probably not), but I sure do appreciate the project as an example of how to use all the tools to implement an isolated environment. And the fact that it actually works with Docker containers (well, why wouldn&#x27; it, but still) is just a cheery on top!
评论 #33218372 未加载
评论 #33218418 未加载
bgribbleover 2 years ago
My team is being hit with really extreme pricing changes for Docker Desktop. I have never been clear on why we even wanted DD (I guess right now it’s the easiest path to getting x86 containers running on M1 Macs?). Alternatives like Podman or even a more extreme solution like this one are becoming more and more attractive.
评论 #33222765 未加载
评论 #33224963 未加载
评论 #33222563 未加载
评论 #33232752 未加载
sbarreover 2 years ago
Just a note that this repo&#x27;s latest update was in 2015
评论 #33218700 未加载
评论 #33219368 未加载
评论 #33218412 未加载
chubotover 2 years ago
It looks like it relies on BtrFS? Can anyone add support for OverlayFS 2? :) which I think is more deployed these days due to Docker itself<p>I’d be curious to see how it looks
评论 #33219034 未加载
评论 #33218465 未加载
评论 #33218899 未加载
cyansmokerover 2 years ago
I was part of this, it was a fun project. I have a final pull request that never made it though, and that&#x27;s too bad as it addressed some hardcoding issues and added a few helpful commands: <a href="https:&#x2F;&#x2F;github.com&#x2F;p8952&#x2F;bocker&#x2F;pull&#x2F;23" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;p8952&#x2F;bocker&#x2F;pull&#x2F;23</a><p>Revisiting the project, it looks like more people tried submitting PRs for the following couple years. Funny, for a project that was definitely an exercise in &quot;do X in 100 lines of code&quot;
mekenover 2 years ago
Anyone know if there’s a blog post which adds more discussion and context for understanding the bash script and how all the commands fit together?
knutwannhedenover 2 years ago
I would have opted for Shocker ;-)
评论 #33221927 未加载
ekiauhceover 2 years ago
I&#x27;m excited to see _Cocker_ implementation in 50 lines of C code :)
wanderlust123over 2 years ago
Any good guides that go i to detail about building docker from scratch? How would one even begin to do something like this?
评论 #33220743 未加载
mavuover 2 years ago
Love this. There is no other single project as overhyped and over used as Docker.<p>This is a great way of making fun of it.
评论 #33221967 未加载
评论 #33221115 未加载
ameliusover 2 years ago
Does it also handle the GPU correctly?
评论 #33219905 未加载
llanowarelvesover 2 years ago
Yet more proof that this exact UX&#x2F;DX from the interface is a major part of the value add.<p>(Edit: and docker-compose)<p>One day the FreeBSD devs will understand. The closest is Focker: <a href="https:&#x2F;&#x2F;github.com&#x2F;sadaszewski&#x2F;focker" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sadaszewski&#x2F;focker</a>
评论 #33219593 未加载
评论 #33219766 未加载
评论 #33219971 未加载
awinter-pyover 2 years ago
follow up blogpost &#x27;reimplementing 100 lines of bash in 1 million lines of go as resume building exercise&#x27;
评论 #33219118 未加载
评论 #33218734 未加载
ohiovrover 2 years ago
8,800 stars!
评论 #33218383 未加载
robertlagrantover 2 years ago
With all those prerequisites it&#x27;s definitely possible. I can implement Docker witt one prereq in one line of Bash:<p><pre><code> docker &quot;$@&quot; </code></pre> You&#x27;re welcome, internet.
评论 #33218978 未加载
评论 #33218371 未加载
sakrasover 2 years ago
This is amazing! Does GitHub allow emoji names? I’d love it to be called 🅱ocker
评论 #33218532 未加载
encryptluks2over 2 years ago
Just because you can doesn&#x27;t mean you should.
评论 #33218898 未加载
elwebmasterover 2 years ago
What an utter bloat and waste of resources has Docker become. Bocker looks refreshing, most of the goodies that made docker popular and no more.
评论 #33221032 未加载