We are really pleased to preview micro containers based on Alpine Linux and hope it will be super useful to the community. Micro containers area fraction of the size of normal containers and a super efficient way to run and deploy your apps.

For perspective the WordPress container based on Debian Wheezy is around 170MB compressed and takes up around 620MB disk space when uncompressed. The WordPress micro container in contrast is a mere 23MB compressed and takes 145MB disk space uncompressed.

There are huge savings in space and bandwidth with zero tradeoff in performance or functionality. All this is of course thanks to Alpine Linux which is a lightweight, network focused and security oriented distribution.

To start with Nginx and WordPress micro containers are available and we will expand that depending on user response. The Nginx micro container is a mere 4.3MB download and takes up a minuscule 18MB disk space.

Following the Flockport convention the container root password is the name of the distribution ie alpine. Please change this with the 'passwd' command on first login.

Alpine Linux

Alpine Linux is based on musl libc and driven by the need to keep things simple and lightweight. It uses OpenRC for init and APK for package management. For those used to Debian its quite similar in many ways.

It has a number of surprisingly useful and nifty features that makes it suitable both as a container or VM host and a container OS.

As a host it’s extremely secure and uses a grsec kernel by default, supports diskless installs with a nifty use of apk package management called LBU and has a fairly healthy collection of packages available.

As a container OS its lightweight nature makes it perfect for containers where you need a lightweight execution environment for your apps. The preview containers gives users a taste of the Alpine Linux environment.

Quick overview of Alpine

Alpine is fairly similar to Debian in most functions. Let's quickly go over basic services and package management here to get your familiar with the basics.

Alpine uses OpenRC as its init. To get a list of currently running services use rc-status.

rc-status

To start or stop a service use rc-service for instance

rc-service nginx restart

You can also use service nginx restart.

To add a service to the default run level

rc-update add nginx default

To add and remove packages you use the apk program. For instance to update the repos.

apk update

To add programs

apk add nginx

To uninstall programs

apk del nginx

The repositories like apt are in /etc/apk and the cache is in /var/cache/apk. You can add and delete user and groups with the addgroup, adduser and delgroup, deluser commands.

Its fairly simple and straight forward. For more head over to the Alpine wiki and tutorials website.