Alpine Linux Docker Image
Welcome to the documentation for the Alpine Linux Docker Image. Here we explain a bit about the motivations behind this image, how you typically use it, the build process, and how to make great minimalist containers!
The heart of this image is Alpine Linux. The image is only 5 MB and has access to a package repository that is much more complete than other minimal base images. Learn more about this image, musl libc, BusyBox, and why the Docker Alpine Linux image makes a great base for your Docker projects.
This image serves as the source for the official Alpine Linux image in the Docker Library. The build process for both official
gliderlabs/alpine are the same. However, different build options are used for the official library images. Check out the build page for more information on differences.
Docker images today are big. Usually much larger than they need to be. There are a lot of ways to make them smaller. But you need to start with a small base. There are great size savings to be had when compared to base images such as
You use the
apk command to manage packages. We don't ship the image with a package index (since that can go stale fairly quickly), so you need to add the
--update-cache flag to
apk when installing. An example installing the
nginx package would be
apk add --update-cache nginx. Check out the usage page for more advanced usage and
The musl libc implementation may work a little different than you are used to. One example of this is with DNS. musl libc does not use
search in the
/etc/resolv.conf file. It also queries name servers in parallel which can be problematic if your first name server has a different DNS view (such as service discovery through DNS). We have a page dedicated to the caveats you should be aware of.
This image is built and tested in a continuous integration environment using the
build script. We then push the resulting images directly to Docker Hub. Check out the page on building and testing the images for more information.
We make reasonable efforts to support our work and are always happy to chat. Join us in our Slack community or submit a GitHub issue if you have a security or other general question about this Docker image. Please email security or user mailing lists if you have concerns specific to Alpine Linux.
We welcome contributions to the image build process, version bumps, and other optimizations. The image gets built and pushed from the
release branch automatically. Once a pull request is merged, a build will be kicked off, and resulting image pushed to Docker Hub in a matter of minutes!
Fastly provides the CDN for our Alpine Linux package repository. This allows super speedy package downloads from all over the globe!