From 8ff7344864e1425c48428673906b3ba89e7a484f Mon Sep 17 00:00:00 2001 From: ofreax Date: Fri, 29 Jan 2016 12:04:08 +0100 Subject: [PATCH 1/6] [twgit] Init hotfix 'hotfix-0.1.5'. From 898d707adb90864054d24d5fbb699161221406ee Mon Sep 17 00:00:00 2001 From: ofreax Date: Fri, 29 Jan 2016 12:07:34 +0100 Subject: [PATCH 2/6] v0.1.5 --- CHANGELOG.md | 3 +++ Makefile | 2 +- README.md | 31 ++++++++++++++++++++----------- image/Dockerfile | 2 +- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b08e46b..d1fd010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.1.5 + - Upgrade baseimage: light-baseimage:0.2.2 + ## 0.1.4 - Upgrade baseimage: light-baseimage:0.2.1 - Makefile with build no cache diff --git a/Makefile b/Makefile index f8e75b3..b114451 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = osixia/backup-manager -VERSION = 0.1.4 +VERSION = 0.1.5 .PHONY: all build build-nocache test tag_latest release diff --git a/README.md b/README.md index 3ce1328..5051263 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # osixia/backup-manager -[![](https://badge.imagelayers.io/osixia/backup-manager:latest.svg)](https://imagelayers.io/?images=osixia/backup-manager:latest 'Get your own badge on imagelayers.io') | Latest release: 0.1.4 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/backup-manager/)  +[![](https://badge.imagelayers.io/osixia/backup-manager:latest.svg)](https://imagelayers.io/?images=osixia/backup-manager:latest 'Get your own badge on imagelayers.io') | Latest release: 0.1.5 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/backup-manager/)  An image to run periodicaly backup-manager. @@ -8,6 +8,7 @@ An image to run periodicaly backup-manager. - [Beginner Guide](#beginner-guide) - [Backup directory and data persistence](#backup-directory-and-data-persistence) - [Use your own Backup Manager config](#use-your-own-backup-manager-config) + - [Fix docker mounted file problems](#fix-docker-mounted-file-problems) - [Debug](#debug) - [Environment Variables](#environment-variables) - [Set your own environment variables](#set-your-own-environment-variables) @@ -15,7 +16,7 @@ An image to run periodicaly backup-manager. - [Link environment file](#link-environment-file) - [Make your own image or extend this image](#make-your-own-image-or-extend-this-image) - [Advanced User Guide](#advanced-user-guide) - - [Extend osixia/backup-manager:0.1.4 image](#extend-osixiabackup-manager014-image) + - [Extend osixia/backup-manager:0.1.5 image](#extend-osixiabackup-manager015-image) - [Make your own backup-manager image](#make-your-own-backup-manager-image) - [Tests](#tests) - [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage) @@ -24,7 +25,7 @@ An image to run periodicaly backup-manager. ## Quick start # Run Backup Manager image - docker run --volume /host/data:/data-to-backup --detach osixia/backup-manager:0.1.4 + docker run --volume /host/data:/data-to-backup --detach osixia/backup-manager:0.1.5 ## Beginner Guide @@ -43,10 +44,18 @@ but setting your own backup-manager.conf is possible. 2 options: - Link your config file at run time to `/container/service/backup-manager/assets/backup-manager.conf` : - docker run --volume /data/my-backup-manager.conf:/container/service/backup-manager/assets/backup-manager.conf --detach osixia/backup-manager:0.1.4 + docker run --volume /data/my-backup-manager.conf:/container/service/backup-manager/assets/backup-manager.conf --detach osixia/backup-manager:0.1.5 - Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide) +### Fix docker mounted file problems + +You may have some problems with mounted files on some systems. The startup script try to make some file adjustment and fix files owner and permissions, this can result in multiple errors. See [Docker documentation](https://docs.docker.com/v1.4/userguide/dockervolumes/#mount-a-host-file-as-a-data-volume). + +To fix that run the container with `--copy-service` argument : + + docker run [your options] osixia/backup-manager:0.1.5 --copy-service + ### Debug The container default log level is **info**. @@ -54,11 +63,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`. Example command to run the container in `debug` mode: - docker run --detach osixia/backup-manager:0.1.4 --loglevel debug + docker run --detach osixia/backup-manager:0.1.5 --loglevel debug See all command line options: - docker run osixia/backup-manager:0.1.4 --help + docker run osixia/backup-manager:0.1.5 --help ## Environment Variables @@ -97,14 +106,14 @@ More help: https://raw.githubusercontent.com/sukria/Backup-Manager/master/doc/us Environment variables can be set by adding the --env argument in the command line, for example: docker run --env BACKUP_MANAGER_TARBALL_DIRECTORIES="/home/billy" \ - --detach osixia/backup-manager:0.1.4 + --detach osixia/backup-manager:0.1.5 #### Link environment file For example if your environment file is in : /data/backup-manager/environment/my-env.yaml docker run --volume /data/backup-manager/environment/my-env.yaml:/container/environment/01-custom/env.yaml \ - --detach osixia/backup-manager:0.1.4 + --detach osixia/backup-manager:0.1.5 Take care to link your environment file to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE). @@ -114,13 +123,13 @@ This is the best solution if you have a private registry. Please refer to the [A ## Advanced User Guide -### Extend osixia/backup-manager:0.1.4 image +### Extend osixia/backup-manager:0.1.5 image If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image. Dockerfile example: - FROM osixia/backup-manager:0.1.4 + FROM osixia/backup-manager:0.1.5 MAINTAINER Your Name ADD environment /container/environment/01-custom @@ -138,7 +147,7 @@ Clone this project : Adapt Makefile, set your image NAME and VERSION, for example : NAME = osixia/backup-manager - VERSION = 0.1.4 + VERSION = 0.1.5 becomes : NAME = billy-the-king/backup-manager diff --git a/image/Dockerfile b/image/Dockerfile index f711616..deebab8 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -1,6 +1,6 @@ # Use osixia/light-baseimage # sources: https://github.com/osixia/docker-light-baseimage -FROM osixia/light-baseimage:0.2.1 +FROM osixia/light-baseimage:0.2.2 MAINTAINER Bertrand Gouny # Install Backup Manager, GNUPG for encryption and cron from baseimage From 54efc42c802f9f72d2c8af3e4e63ae67ca52d6bd Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Mon, 1 Feb 2016 13:39:13 +0100 Subject: [PATCH 3/6] docs --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5051263..b43d259 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ # osixia/backup-manager -[![](https://badge.imagelayers.io/osixia/backup-manager:latest.svg)](https://imagelayers.io/?images=osixia/backup-manager:latest 'Get your own badge on imagelayers.io') | Latest release: 0.1.5 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/backup-manager/)  +[![Docker Pulls](https://img.shields.io/docker/pulls/osixia/backup-manager.svg)][hub] +[![Docker Stars](https://img.shields.io/docker/stars/osixia/backup-manager.svg)][hub] +[![Image Size](https://img.shields.io/imagelayers/image-size/osixia/backup-manager/latest.svg)](https://imagelayers.io/?images=osixia/backup-manager:latest) +[![Image Layers](https://img.shields.io/imagelayers/layers/osixia/backup-manager/latest.svg)](https://imagelayers.io/?images=osixia/backup-manager:latest) + +[hub]: https://hub.docker.com/r/osixia/backup-manager/ + +Latest release: 0.1.5 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/backup-manager/)  + +An image to run periodically backup-manager. -An image to run periodicaly backup-manager. - [Quick start](#quick-start) - [Beginner Guide](#beginner-guide) From e49f427e835d4c35adc39d7f539de778e32166fe Mon Sep 17 00:00:00 2001 From: ofreax Date: Mon, 1 Feb 2016 18:25:08 +0100 Subject: [PATCH 4/6] change data dir --- image/service/gpg/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/service/gpg/startup.sh b/image/service/gpg/startup.sh index 5ab8350..abc4620 100755 --- a/image/service/gpg/startup.sh +++ b/image/service/gpg/startup.sh @@ -6,7 +6,7 @@ log-helper level eq trace && set -x [ -d ${CONTAINER_SERVICE_DIR}/gpg/assets/.data ] || mkdir -p ${CONTAINER_SERVICE_DIR}/gpg/assets/.data chmod 400 -R ${CONTAINER_SERVICE_DIR}/gpg/assets/ -ln -sf ${CONTAINER_SERVICE_DIR}/gpg/assets/.data $HOME/.gnupg +ln -sf ${CONTAINER_SERVICE_DIR}/gpg/.data $HOME/.gnupg FIRST_START_DONE="${CONTAINER_STATE_DIR}/docker-gpg-first-start-done" # container first start From f5b14146434e10b6ca454ba748e75a381d629596 Mon Sep 17 00:00:00 2001 From: ofreax Date: Mon, 1 Feb 2016 18:28:28 +0100 Subject: [PATCH 5/6] change data dir --- image/service/gpg/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/service/gpg/startup.sh b/image/service/gpg/startup.sh index abc4620..a4588f8 100755 --- a/image/service/gpg/startup.sh +++ b/image/service/gpg/startup.sh @@ -4,7 +4,7 @@ # https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/log-helper log-helper level eq trace && set -x -[ -d ${CONTAINER_SERVICE_DIR}/gpg/assets/.data ] || mkdir -p ${CONTAINER_SERVICE_DIR}/gpg/assets/.data +[ -d ${CONTAINER_SERVICE_DIR}/gpg/.data ] || mkdir -p ${CONTAINER_SERVICE_DIR}/gpg/.data chmod 400 -R ${CONTAINER_SERVICE_DIR}/gpg/assets/ ln -sf ${CONTAINER_SERVICE_DIR}/gpg/.data $HOME/.gnupg From 9b1da9749f64f1abca7b03c2942f1064be43b343 Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Thu, 18 Feb 2016 11:11:31 +0100 Subject: [PATCH 6/6] follow best practices --- image/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/image/Dockerfile b/image/Dockerfile index deebab8..992ba69 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -10,16 +10,16 @@ RUN apt-get -y update \ && /container/tool/add-service-available :cron \ && LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes --no-install-recommends \ backup-manager \ - gnupg + gnupg \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Add service directory to /container/service ADD service /container/service -# Use baseimage install-service script and clean all +# Use baseimage install-service script # https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/install-service -RUN /container/tool/install-service \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +RUN /container/tool/install-service # Add default env variables ADD environment /container/environment/99-default