RSS

Posts in 2019

  • Shell usage in dockerfile

    Monday, February 04, 2019 in Docker

    The default shell is [“/bin/sh”, “-c”], which doesn’t handle pipe fails when chaining commands. To process errors when using pipes use this : SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"] References …

    Read more

Posts in 2018

  • Docker compose predictable bridge

    Tuesday, September 25, 2018 in Docker

    By default, docker-compose will create a network with a randomly named bridge. If you are like me using a strict firewall on all your machines, this just cannot work. You need to put your services in network_mode: “bridge” and add a custom network …

    Read more

  • Migrate a data volume

    Tuesday, January 30, 2018 in Docker

    Here is how to migrate a data volume between two of your hosts. A rsync of the proper /var/lib/docker/volumes subfolder would work just as well, but is here a fun way to do it with docker and pipes : export VOLUME=tiddlywiki export DEST=10.1.0.242 …

    Read more

  • Cleaning a docker host

    Monday, January 29, 2018 in Docker

    Be carefull that this will delete any stopped container and remove any locally unused image and tags : docker system prune -f -a

    Read more