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.

Docker without Docker

681 pointsby deepakprakashabout 10 years ago

26 comments

chimeracoderabout 10 years ago
Author here - I&#x27;m working on a blog post for this and didn&#x27;t expect this to be posted on HN so soon, but I guess that&#x27;s what I should expect for posting a link to it in another HN comment! :)<p>These slides correspond to a workshop I conducted a week ago demonstrating the internals of Docker and how Docker containers can be run without using any of the Docker tools or runtime.<p>Docker is a great tool, and I&#x27;m glad it&#x27;s gained so much traction. But containerization is still new to many people, and even then there&#x27;s still a lot of confusion about the difference between Docker and containerization in general. The goal of this presentation isn&#x27;t to discourage anyone from using Docker, but to outline the lay of the land for people interested in using containers.<p>Personally, I run containers both with systemd and with Docker. The good news is that it&#x27;s really easy to switch from one to the other, so there&#x27;s very little cost to trying it out both ways.
评论 #9442500 未加载
评论 #9443475 未加载
评论 #9443278 未加载
评论 #9442758 未加载
评论 #9445214 未加载
评论 #9443657 未加载
评论 #9442736 未加载
评论 #9442443 未加载
评论 #9444336 未加载
评论 #9443861 未加载
jlhawnabout 10 years ago
The slides mention that Docker containers have hashes. This is not the case. In fact, it&#x27;s probably one of the biggest user misunderstandings of Docker. Container IDs and Image IDs are <i>not</i> SHA hashes. Even though it may look like it they are actually just randomly generated 256-bit hex-encoded unique identifiers.<p>Since the slides also mention that you can use Docker images with a systemd-nspawn&#x2F;machinectl setup it would be great if they soon supported the v2 Docker Registry and image format which actually does use content-addressable hashes for images.
评论 #9442450 未加载
sigmonsaysabout 10 years ago
Use LXC and LXD. It&#x27;s the best of both worlds. Docker is very limiting and already falling short in features. For instance daemon must run as root which sucks. LXC supports unprivileged namespaces so all users of a system can have their own set of containers. Docker insists on being the parent process, That means when docker dies, so do all your containers.. This is really bad...
评论 #9443423 未加载
falcolasabout 10 years ago
You may want to mention that the network and disk isolation are not what someone from Docker would expect by default.<p>It uses the docker equivalent of &quot;net=host&quot; (which provides better performance at the cost of isolation), and the disk is pointing at a shared &quot;changeroot&quot; on disk, instead of at a layered FS.<p>Both of these can be better isolated with natted interfaces and a `btrfs` (which has its own reliability issues) layered image, but they are not what you expect by default.
mverwijsabout 10 years ago
&gt; At its core, your OS is just a bunch of files<p>&quot;But, you NEED to run the installer on that (bare metal) server!&quot; Nope, I can just boot from knoppix (remember?) and mount the disk and run debootstrap on it.<p>Every so often I run into programmers and sysadmins that believe these things are a kind of magic. They&#x27;re not. They&#x27;re just files on a disk.<p>Love this presentation. Thank you!<p>edit: s&#x2F;mount knoppix&#x2F;boot from knoppix&#x2F;
e12eabout 10 years ago
Very interesting. Almost got ready to up my systemd-hate on slide 19: &quot;machinectl -H root@example.com:debian-tree&quot;[1] -- but calmed down and had a look around and saw that it just uses ssh, not some pottering pixiedust kerberos abomination...:<p><a href="http:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;machinectl.html" rel="nofollow">http:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;machinectl.h...</a><p>With proper handling of access (allowing unprivileged users to start containers) along with --bind for the home directory, this could be a viable alternative to Debian&#x27;s schroot [s].<p>There&#x27;s also a complimentary lwn article from 2013 that&#x27;s worth reading:<p><a href="https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;572957&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;572957&#x2F;</a><p>That also contains a quote that explains a bit about systemd (if read maliciously): &quot;As part of the development of systemd, the team looked at various kernel features to see if they were relevant to the project.&quot;<p>At least with this (containers w&#x2F;log handling etc) we get <i>something</i> for our complexity. Still, having had two seperate machines fail to boot&#x2F;even come up with a text console with some sensible errors - I&#x27;m far from sold on the idea that I want all these features in PID 1.<p>[1] changed user &quot;foo&quot; to &quot;root&quot; to be a little more clear. Maybe &quot;user1&quot; would work as well - but systemd (unlike lxc etc) requires root?).<p>[s] <a href="https:&#x2F;&#x2F;wiki.debian.org&#x2F;Schroot" rel="nofollow">https:&#x2F;&#x2F;wiki.debian.org&#x2F;Schroot</a><p>Reminds me that I should probably make write-up of how I set up schroot to allow &quot;source&quot;-access for root, and automagic sessions for a standard user backed by lvm -- the documentation is a bit dense.
vezzy-fnordabout 10 years ago
tl;dr It&#x27;s basically a tech demo for systemd, and the systemd-nspawn tool in particular (which you might recall recently gained Docker format support).
评论 #9442612 未加载
tobbybabout 10 years ago
This is what normal LXC containers has always done. Systemd nspawn does not yet provide a toolset to wrap these capabilities like the LXC project. Things like userland tools, library of OS templates for containers, networking, features like unprivileged containers that allow non root users to run containers etc.<p>Lennart Poettering has spoken about containers and btrfs subvolumes and easy snapshots, this could be the direction systemd goes in future for managing the OS with apps in btrfs subvolume containers, with rollback, management etc so this seems like it may mature fairly fast, except unprivileged container support which Lennart does not seem to like.[1]<p>[1]<a href="https:&#x2F;&#x2F;plus.google.com&#x2F;+LennartPoetteringTheOneAndOnly&#x2F;posts&#x2F;W2itNERXvMh" rel="nofollow">https:&#x2F;&#x2F;plus.google.com&#x2F;+LennartPoetteringTheOneAndOnly&#x2F;post...</a>
markbnjabout 10 years ago
As a heavy docker user who only has a couple of years of focused linux experience I found this fascinating, even if you weren&#x27;t quite ready to post it. Thanks for the slides.
russell_habout 10 years ago
This is almost exactly how we run the Ironic provisioning agent that supports Rackspace OnMetal. We export use Docker to build and export an image, then use CoreOS + systemd-nspawn to run it across every unprovisioned machine.
评论 #9444724 未加载
monochromaticabout 10 years ago
Anybody else having issues navigating? I&#x27;m on Firefox.
评论 #9443037 未加载
zobzuabout 10 years ago
that&#x27;s a good intro to systemd-nspawn and machinectl - which happen to be much nicer to use than docker (yet transparently work with docker images if you want that). its also easier to install since you generally &quot;already have it&quot; and there&#x27;s no setup.<p>There&#x27;s a few things it doesn&#x27;t do (neither docker, or lxc for that matter) - yet at least - such as mounting fses before container start or manage upgrades.
评论 #9443434 未加载
Twirrimabout 10 years ago
We&#x27;re back to chroot jails again?
评论 #9443272 未加载
lobster_johnsonabout 10 years ago
This slideshow is impossible to read on an iPad; the scrolling isn&#x27;t synchronized with the width of the screen, and attempting to align a page makes it jump to another. Any solutions?<p>Edit: Apparently, if you don&#x27;t touch-move but only tap, you can keep it for, getting out of sync.
seifertericabout 10 years ago
Somewhat unrelated. Is there a way to ship a container image with just a &quot;diff&quot; of the default image. Say I build a container with ubuntu 14.04 + some packages installed with apt. I would like to be able to &quot;export&quot; the filesystem, but only the files that are not present in the base os image. The reason I would like this is that I would like to use docker (or systemd-nspawn) to run containers on an device that will not always have access to the internet. It would be nice to be able to add a new package to that device, and not be multi 100 MBs. As long as I can guarantee that the base image is present on the device, I should not need to include it in the image.
评论 #9446989 未加载
评论 #9444473 未加载
gosubabout 10 years ago
So we should also add Docker to the chimera that systemd is becoming?
评论 #9443910 未加载
haddrabout 10 years ago
What is the actual difference here between using debootstrap and LXC?
评论 #9442742 未加载
评论 #9442618 未加载
dorfsmayabout 10 years ago
@chimeracoder:<p>First thanks, this was really interesting.<p>Sorry, I must not be that bright, I cannot guess your email from your username :-( (and I don&#x27;t have a tumbler login, and you haven&#x27;t enable dm from strangers on twitter), but I wanted to point at that you have a typo on slide 9, s&#x2F; journactl&#x2F;journalctl&#x2F;.
yesbabyyesabout 10 years ago
Combining this with IPFS could be pretty cool!
mmgutzabout 10 years ago
I haven&#x27;t used Docker myself. So what value add does Docker provide?
评论 #9444294 未加载
epaulsonabout 10 years ago
What about the entries in &#x2F;dev? Is mknod not a thing anymore, or do I not need to have &#x2F;dev entries in my container root filesystem?
评论 #9444377 未加载
octatoanabout 10 years ago
I&#x27;m very sad that Hacker School had to change its name (for entirely valid reasons, although it&#x27;s sad they&#x27;re there). &quot;Recurse Center&quot; makes it sound like some . . . creationist think-tank.
faizshahabout 10 years ago
This is interesting, any recommendations for further reading?
bandramiabout 10 years ago
What&#x27;s old is new. You&#x27;re describing containers I think.
评论 #9442782 未加载
评论 #9442498 未加载
synaesthesisxabout 10 years ago
I feel like HN really loves docking.
anonbankerabout 10 years ago
So, this is just a systemd commercial pretending to be about docker?
评论 #9443698 未加载