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?
Reasons to consider:
packages
in mydocker image
unless I know I need them. ExampleSSH Server
inPHP7
orNginx
that you mentioned. It's not avm
, it's acontainer
.container
like a fullVM
, long running withmulti services
.Docker
philosophy is usingmicroservices
, and separate them in multiplecontainers
, This has many advantages like: fault isolation, easier upgrades, scaling, etc.APT
: This fix is in official ubuntu image too.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 usinglibrary
base images
likealpine
, for being lightweight, ordebian
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 buildingcontainers
. Using thescratch
image signals to the build process that you want the next command in theDockerfile
to be thefirst filesystem layer
in yourimage
.While
scratch
appears inDocker
’s repository on thehub
, you can’tpull
it, run it, or tag any image with the namescratch
. Instead, you can refer to it in yourDockerfile
.