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.
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!
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.
can i install java 8 on top of this image?
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!
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.
This is awesome! Thank you!
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