Puffin 0.7

I am very happy to announce next release 0.7 of Puffin. It’s been a while since the last one, but there are many exciting features.

First of all Puffin now supports backup & restore using volume-backup. Before the operation, application needs to be stopped, in order to prevent any data inconsistency. Due to its simplicity, all applications support it out of the box.

Second notable feature is HTTPS support. It can be activated in app settings. Under the hood it uses Let’s Encrypt to generate individual free certificates.

Finally there are two new important apps that I am using daily on Puffin:

  • Nextcloud – a free and open-source Dropbox on steroids,
  • Mastodon – a decentralized, open source social network.

In the future i hope to keep more regular and frequent release cycle.

Happy hosting!

Sojourner

I am happy to announce new version of Sojourner FOSDEM conference companion. Last time it was a mobile app for Nokia N900 phone, now it’s a progressive web app, available on mobile and desktop environment. The goal is to make it fully usable offline (not yet fully working).

You can access it here: https://sojourner.loomchild.net and the code can be found here: https://github.com/loomchild/sojourner-web. The original mobile app can be found here: https://github.com/loomchild/sojourner.

All feedback welcome!

Backup & Restore Docker Named Volumes

I finally started implementing backup & restore feature for Puffin. The first issue I encountered was to make a backup of named volumes.

The official Docker documentation mentions only data volume containers and –volumes-from option. There’s also docker cp command, but it requires knowing the path where the volumes are mounted in the container that uses them.

It turns out it’s pretty easy to do using volume mounts and tar.

To backup some_volume to /tmp/some_archive.tar.bz2 simply run:

And to restore run:

I have chosen alpine image since it’s lightweight and contains everything what’s needed. One potential issue might be preserving file ownership since different users and groups exist on different containers. Classical solution to this problem is to run the tar command using the same image as the one normally using the volume instead of alpine, but what if there’s no tar there? Using numeric owner generally preserves permissions correctly, unless you also use user namespaces. Also you need to remember to stop all the containers using the volume being backed-up or restored, otherwise an inconsistent / intermediate state the data might be archived.

Ultimately I wrote my own little volume-backup utility for backup and restore of volumes that simplifies the process even further and offers some improvements. Example usage (see README for more details):

Feel free to check it out and let me know what do you think.

Edit: Changed the cleanup code to delete hidden files – thanks for a comment Olivier.

Edit: It’s also possible to backup to standard output and restore from standard input. I added this capability to volume-backup – thanks for a comment, suggestion and example Holger

Edit: Added –rm flag to remove the container when finished, thanks awade.

Docker Can Create Only 31 Networks per Machine

I have just learned that in Docker there is a limit of 31 networks for default network driver on a single machine:

docker-black

This is due to the fact that it uses hardcoded list of broad network ranges – 172.17-31.x.x/16 and 192.168.x.x/20 – for bridge network driver. Look into ipamutils and allocator for more details. For overlay network driver 64K networks can be created.

There seems to be no solution to circumvent this limitation apart from manually specifying subnet ranges for each created network – see Docker network create subnet option and Docker Compose network configuration reference. In Puffin, which needs to create a separate network for each application, I implemented a simple address allocator.