Public Repository

Last pushed: a month ago
Short Description
Image based on Alpine Linux will help you win at minimalism
Full Description

A super small Docker image based on Alpine Linux. The image is only 5 MB and has access to a package repository that is much more complete than other BusyBox based images.

Usage

Stop doing this:

FROM ubuntu-debootstrap:14.04
RUN apt-get update -q \
  && DEBIAN_FRONTEND=noninteractive apt-get install -qy mysql-client \
  && apt-get clean \
  && rm -rf /var/lib/apt
ENTRYPOINT ["mysql"]

This took 19 seconds to build and yields a 164 MB image. Eww. Start doing this:

FROM gliderlabs/alpine:3.1
RUN apk-install mysql-client
ENTRYPOINT ["mysql"]

Only 3 seconds to build and results in a 16 MB image! Hooray!

Build

This image is built and pushed using CircleCI. See the repository at https://github.com/gliderlabs/docker-alpine for information on manual building and testing.

Docker Pull Command
Owner
gliderlabs

Comments (12)
billysutomo
a year ago

can i install java 8 on top of this image?

maerf0x0
a year ago

I was trying to figure out why to use this instead of alpine/3.2

http://gliderlabs.viewdocs.io/docker-alpine/build/ was useful.

delitescere
2 years ago

Check out my "Smallest JVM containers in the world"™ https://hub.docker.com/u/delitescere/ based on this Alpine image.

sashaegorov
2 years ago

I love it. I wonder that apk is simple yet powerful. Set of packages and version is comprehensive too. I'm building containers for Rails/Sinatra apps, and depending on packages included it is only 50-90 megs! Thanks!

frolvlad
2 years ago

There are two awesome Oracle Java images:

Check out more minimalistic images in my frolvlad repo.

andyshinn
2 years ago

No, you can't just download the Linux x64 binaries of Java 8 like you can for progrium/busybox. That image is built with glibc while Alpine Linux is built with musl libc. Java 8 is relying on specific symbols only in glibc and doesn't work on musl.

prenaudat
2 years ago

To install java on the alpine, you can simply redo what jean blanchard does here:
https://registry.hub.docker.com/u/jeanblanchard/busybox-java/
cheers

frolvlad
2 years ago

This is awesome! Thank you!

andyshinn
2 years ago

Java 8 currently relies on some symbols in glibc. This makes it incompatible with musl at the moment:

/jdk1.8.0_31 # ldd bin/java
    /lib64/ld-linux-x86-64.so.2 (0x7f542ebb5000)
    libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f542ebb5000)
    libjli.so => bin/../lib/amd64/jli/libjli.so (0x7f542e9a0000)
    libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f542ebb5000)
    libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f542ebb5000)
Error relocating bin/../lib/amd64/jli/libjli.so: __rawmemchr: symbol not found
bubuntux
2 years ago