Docker image for Wallabag v2

Sometimes I want to save articles that I want to read for later, because I don’t have the time to read right now. There are a couple of free online services that you can use, like Instapaper or Pocket. The services all work the same:

  • you give them a link to a webpage you want to read later
  • they scrape the page and store the text
  • when you got time, you open the service in your browser or a mobile app and read the article
  • you can save, delete, star the article

But with my ongoing quest to avoid services and host my own versions of them, I began using my own installation of Wallabag a couple weeks ago. Of course I decided to run it in a Docker container. Wallabag provides an official docker image you can use to get started. It works fine, although I had an issue when trying to run it behind a reverse proxy. But I worked around that and Wallabag in general works good enough that I don’t feel the urge to switch back to Instapaper every time I use it. The android app could use some love, but – again – it works good enough that I don’t want to hang myself everytime I use it.

Then I had a couple of issues with the docker container on my server. I tried to restart a couple of my container and while checking the process list of the server I noticed a defunct process pointing to the s6 and nginx services in the Wallabag container. This lead to a full server reboot, because I couldn’t kill the process and I couldn’t get rid of the container.

Because I don’t like rebooting my server just because I have a stray container running, I build my own docker image for Wallbag based on php:apache image and without any kind of additional supervisor. I run a couple other containers based on this image and I never had any issues with them, so I hope there won’t be any stray processes on my server anymore.

To use my image, just run the following command on your command line:

docker run --rm -p 8080:80 -v ./data:/var/www/wallabag/data moritanosuke/wallabag-docker

After the container is up, you can access your Wallabag at http://localhost:8080. All data will be stored in the directory data, so you should be able to stop/start the container and all your stored articles should still be there. Please note that I use the option --rm, so the container will be removed as soon as it is stopped.

Personally I like to run my containers via docker-compose. Here’s an example for your docker-compose.yml:

version: '2'

    image: moritanosuke/wallabag-docker
    - 8080:80
    - ./data:/var/www/wallabag/data
    - SYMFONY_ENV=prod

Now you can just run docker-compose up and you should be able to access your Wallabag at http://localhost:8080 again.

My docker image is slightly bigger, 260MB for an apache image instead of 150MB for the official image based on Alpine Linux – but I take that if I don’t have to reboot my server every couple of weeks.

If you want to try Wallabag, please give my image a shot and report any issues so I can improve it.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.