Docker - What are your images based on?

shadow_man

Executive Member
Joined
May 27, 2005
Messages
7,025
Reaction score
1,745
Location
Cape Town
I've been spending some time today playing with Docker and i've noticed that the images themselves are fairly chunky (400-500MB just for an IRC bouncer).

I tested both Ubuntu and CentOS and found this to be the case. Then I looked at Alpine Linux and it seems that you can create the same image for 200-300MB. It also looks like Docker is trying to make a move to use Alpine for all their official images.

This has me wondering - what do others use and why?

Are you more focussed on size, security - or do you simply use whatever is most familiar / has the most ease of use?

Below is a list of the CentOS / Alpine / Ubuntu official images and as you can see Alpine is TINY in comparison.

Code:
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
docker.io/centos    latest              bb3d629a7cbc        3 weeks ago         196.6 MB
docker.io/alpine    latest              2a250d324882        3 weeks ago         4.794 MB
docker.io/ubuntu    15.04               314a1f078530        8 weeks ago         131.3 MB
 
Last edited:
Different libc in alpine, so that could be an issue with some apps.

Personally I use debian. Its minimalist, but not as minimal as alpine.
Alpine uses apk as a package manager, similar enough to debian / ubuntu really.

Smaller is obviously better from most standpoints, especially memory.
Not sure why your images are so large though Mr Sheed jr.
 
Different libc in alpine, so that could be an issue with some apps.

Personally I use debian. Its minimalist, but not as minimal as alpine.
Alpine uses apk as a package manager, similar enough to debian / ubuntu really.

Smaller is obviously better from most standpoints, especially memory.
Not sure why your images are so large though Mr Sheed jr.

Base install with some tools to compile. Nothing fancy. The default base images are already +-200MB on their own. I guess I could clean up the app installs more though (currently just using yum clean all to purge cached installs).

Code:
RUN yum update -y \
    && yum install gcc openssl openssl-devel wget sudo -y \
    && yum group install "Development Tools" -y \
    && mkdir -p /src \
    && cd /src \
    && wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" \
    && tar -zxf "znc-${ZNC_VERSION}.tar.gz" \
    && cd "znc-${ZNC_VERSION}" \
    && ./configure \
    && make \
    && make install \
    && yum clean all \
    && rm -rf /src* /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
Top
Sign up to the MyBroadband newsletter
X