Is using phusion/baseimage still worth it?

5.8k views Asked by At

My question is simple: why use phusion/baseimage?

I've read the site. I've been all over it. It's marketed as better than base, ultraslim built specifically for Docker. With that said: then why aren't official builds using it by now?

phusion/baseimage been out for a while now, but official builds for php, mysql, etc, are still using debian or ubuntu directly... Why?

I'm not finding any simple docker-esque (single instances) packages that inherit themselves from phusion/baseimage. php7 and nginx uses debian:jessie directly. mysql uses ubuntu.

The whole point of phusion/baseimage is to get away from full bloated based "VM" containers.

So, my question again: is using phusion/baseimage still worthwhile?

2

There are 2 answers

2
Farhad Farahi On

Reasons to consider:

  • I personally don't want to put all the packages in my docker image unless I know I need them. Example SSH Server in PHP7 or Nginx that you mentioned. It's not a vm, it's a container.
  • Looks like they are trying to make a container like a full VM, long running with multi services. Docker philosophy is using microservices, and separate them in multiple containers, This has many advantages like: fault isolation, easier upgrades, scaling, etc.
  • Fixes APT: This fix is in official ubuntu image too.
  • These kind of images come with alot of complications, and remove the simplicity of microservices design. I'm sure it will get in your way.

I recommend using library images for known technologies, ie. PHP, Apache, etc. Using this + microservices will help your greatly long term. Now if you want to make your own images, I recommend using library base images like alpine, for being lightweight, or debian because amost all library images are based on them.

You have another option called scratch:

You can use Docker’s reserved, minimal image, scratch, as a starting point for building containers. Using the scratch image signals to the build process that you want the next command in the Dockerfile to be the first filesystem layer in your image.

While scratch appears in Docker’s repository on the hub, you can’t pull it, run it, or tag any image with the name scratch. Instead, you can refer to it in your Dockerfile.

FROM scratch
...
4
user2105103 On

I'm not sure phusion's mission is to reduce bloat -- it's always been bloated.

Back when I started messing with docker, the ecosystem was much, much smaller. Phusion was an interesting image that demonstrated multiple services running within a single container, a functioning SSH server for remote access (way before it was easier to jump inside a running container).

Debian/Ubuntu are great for running a stable server. They are horribly bloated for a container/service.

At the moment, as an IT professional -- I see no compelling reason to use phusion, except perhaps for some learning. I would much rather own/understand my container.