From f29d62a14a1d8665ac3f500eee7bc4d29a7dbf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Wed, 13 Dec 2017 18:07:18 +0100 Subject: [PATCH] docs: add documentation --- .gitignore | 1 + README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/README.md b/README.md index 86efe63..c9f176f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,51 @@ -# baseimage alpine -[![Build Status](https://drone.jcg.re/api/badges/jcgruenhage/docker-baseimage-alpine/status.svg)](https://drone.jcg.re/jcgruenhage/docker-baseimage-alpine) +# docker.jcg.re/base-alpine +[![Build Status](https://drone.jcg.re/api/badges/jcgruenhage/docker-base-alpine/status.svg)](https://drone.jcg.re/jcgruenhage/docker-base-alpine) -A little baseimage based on alpine and s6. Docs coming soon :tm: +A small base image based on [Alpine Linux](https://www.alpinelinux.org/) (current stable release) and +[s6](http://www.skarnet.org/software/s6/index.html). +### Building on top of this + +To build on top of this image, you can base a Dockerfile on this: + +```dockerfile +FROM docker.jcg.re/base-alpine +MAINTAINER Your Name + +RUN echo "install stuff here" + +ADD root / +``` + +The folder structure of root should look kinda like this, every of these parts is optional: +``` +root +|-- etc +| |-- s6 +| | |-- your-service +| | | |-- run +| | | |-- finish +| | | |-- crash +| |-- periodic +| | |-- hourly +| | | |-- somescript +``` +The folder your-service should contain three executables: + - `run`, is run when the service is started (container startup) + - `finish`, is run when the service is stopped + - `crash`, is run when the service crashes + +Also, your-service is an example name, you should replace it with the name of the software running in there. + + +Inside the `/etc/periodic` folder, there are 5 folders: + - 15min + - hourly + - daily + - weekly + - monthly + +Inside those, you can put executable shell scripts (starting with `#!/bin/sh`), +and they'll be executed regularly in the specified interval. + +For custom intervals, you can always edit crontab. \ No newline at end of file