From 5205fa04f7e16dff058d561b20785775d604b885 Mon Sep 17 00:00:00 2001 From: Travis Rowland Date: Mon, 20 Mar 2017 20:48:24 -0700 Subject: [PATCH] Updating README.md Fixes #228 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1b79962..202cd6b 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ The baseimage-docker init system, `/sbin/my_init`, runs the following scripts du All scripts must exit correctly, e.g. with exit code 0. If any script exits with a non-zero exit code, the booting will fail. +**Important note:** If you are executing the container in interactive mode (i.e. when you run a container with `-it`), rather than daemon mode, you are sending stdout directly to the terminal (`-i` interactive `-t` terminal). If you are not calling `/sbin/my_init` in your run declaration, `/sbin/my_init` will not be executed, therefore your scripts will not be called during container startup. + The following example shows how you can add a startup script. This script simply logs the time of boot to the file /tmp/boottime.txt. In `logtime.sh`: