
CoreOS Overview, Part One - nslater
https://deis.com/blog/2016/coreos-overview-p1
======
natch
Pardon my ignorance... Is CoreOS an alternative to Docker? And if yes, what
are the tradeoffs between the two?

~~~
vidarh
CoreOS is a Linux distro based on Gentoo. It is noteworthy for being very
small, built for "all-or-nothing" automated updates, and geared for
clustering.

Basically if installed on disk (you can also boot it over the network or from
a USB stick etc.) it updates by having two system partitions - one "known
good" because you've successfully booted from it, and one used to download new
updates to, and then will (by default) automatically reboot and switch to
update.

The system you end up in is basically systemd + Etcd + Fleet (with Kubernetes
on the way) + Docker and rkt, with very little else included.

If you want to spin up a large cluster where everything will run in Docker or
rkt containers, that's something CoreOS is well suited for.

~~~
jimmcslim
But it seems that CoreOS is more suitable as being the underlying OS on which
containers are run, rather than being the basis of a container image?

~~~
jsmthrowaway
Container images do not _need_ operating systems, and I will forever be angry
with Docker for tainting the concept in popular usage. Research a static
binary as a container to see what I mean.

Nobody who built containers before Docker came along shipped an operating
system in the image. Now we have gigabytes of Ubuntu alongside nginx thanks to
Docker. Cool.

~~~
shykes
Disclaimer: I work at Docker.

> _Nobody who built containers before Docker came along shipped an operating
> system in the image. Now we have gigabytes of Ubuntu alongside nginx thanks
> to Docker. Cool._

First: I believe shipping the entire distro in each container was in fact the
most common use of containers before Docker, since openvz/vserver/lxc were
focused on "mini-servers" (to this day you can still rent openvz-based vps).
So I think your statement is incorrect.

I also think your (eternal?) anger might be misplaced. Yes, today most people
who use Docker build containers with unnecessary distro bits in them. But
before Docker, 99% of them didn't build containers at all, and struggled with
non-repeatable deployments and dependency hell. Even better, now all these
people use a standardized Dockerfile which can be changed and improved over
time - for example to move away from a heavyweight distro like fedora or
ubuntu, to something like alpine or even more minimalistic.

Incidentay, we have hired Natanael Copa, the awesome creator of Alpine Linux
and are in the process of switching the Docker official image library from
ubuntu to Alpine. You can help us with pull requests to
[https://github.com/docker-library](https://github.com/docker-library) if you
want :)

Even one such pull request could go a long way to promoting smaller
containers, since those images have been downloaded over half a billion times.

~~~
kylequest
> Yes, today most people who use Docker build containers with unnecessary
> distro bits in them.

>... to move away from a heavyweight distro like fedora or ubuntu, to
something like alpine or even more minimalistic.

The distro package management is one of the biggest reasons why people still
stick with heavyweight distros like Ubuntu.

This is why DockerSlim [1] was created (at one of the Docker hack days, by the
way :-)) It lets you use heavyweight distros as-is eliminating everything you
don't need. You get the best of both worlds where you don't have to change
your process and you still get small images (7, 10, 20 and even 30 times
smaller than the original).

[1] - [http://dockersl.im](http://dockersl.im)

P.S.

It is safe for use in production :)

~~~
jtblin
There's a packer manager in alpine. Maybe not as complete as ubuntu but pretty
decent imho.

~~~
kylequest
Yes, it does have a package manager, but... , like you said, it's not as
complete and it is different, which means you need to put in extra efforts to
convert and make things work (also don't forget about a potential lib C
compatibility fun). Why go through all this trouble though? Why not use the
distro you are already using as-is and still get Alpine-like image sizes? One
nice thing about Alpine is its hardened kernel, but you won't be using it in
your Docker container. Alpine is nice, but it's not worth it when there are
other alternatives that don't require extra time and effort I'd rather use to
build a better product.

And if you are using 3rd party Docker images Alpine won't help :)

