From 73b676179810954580e906cc3f0409b182953f6c Mon Sep 17 00:00:00 2001 From: Warren Van Winckel Date: Mon, 30 Apr 2018 09:57:51 -0700 Subject: [PATCH 1/2] Describe why+how to build new stackstorm image --- README.md | 24 +++++++++++++++++------- images/stackstorm/Dockerfile | 5 ++++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 981f6c8e..b6dc7c84 100644 --- a/README.md +++ b/README.md @@ -79,22 +79,31 @@ Second, start the docker environment. execute This will pull the required images from docker hub, and then start them. -However, if you find need to modify the stackstorm image, you will need to build it. Run: +To stop the docker environment, run: ``` - REPO=stable - docker build --build-arg ST2_REPO=${REPO} -t stackstorm/stackstorm:${REPO} images/stackstorm + docker-compose down ``` -where REPO is one of 'stable', 'unstable', 'staging-stable', 'staging-unstable'. Otherwise, -the following `docker-compose` command will download the specified image from docker hub. +## Building the stackstorm image -To stop the docker environment, run: +The pre-built `stackstorm/stackstorm` image may not meet your requirements. You may need to install +additional libraries, packages or files into the image. For example, if you want to install the +Ansible pack, you must first install the `libkrb5-dev` package. While the package could be installed +using a script in `/st2-docker/entrypoint.d`, this will increase the startup time of the container +and may result in containers that execute different code than others. + +Make any necessary changes to `images/stackstorm/Dockerfile`. For example, append `libkrb5-dev` to +the first `apt-get install` command. Next, run: ``` - docker-compose down + REPO=stable + docker build --build-arg ST2_REPO=${REPO} -t stackstorm/stackstorm:${REPO} images/stackstorm ``` +where REPO is one of 'stable', 'unstable', 'staging-stable', 'staging-unstable'. Otherwise, +the following `docker-compose` command will download the specified image from docker hub. + ### Getting started: Simple Tutorial Tour @@ -208,6 +217,7 @@ You can bind mount these scripts as mentioned in the previous section. NOTE: These scripts are currently not available when running in 1ppc mode. + ## To enable chatops Chatops is installed in the `stackstorm` image, but not started by default. diff --git a/images/stackstorm/Dockerfile b/images/stackstorm/Dockerfile index 77e79f50..f53d20f6 100644 --- a/images/stackstorm/Dockerfile +++ b/images/stackstorm/Dockerfile @@ -20,7 +20,10 @@ RUN DEBIAN_FRONTEND=noninteractive \ crudini \ uuid-runtime \ apache2-utils \ - bash-completion + bash-completion \ + libkrb5-dev + +#software-properties-common \ # enable bash-completion RUN dpkg-divert /etc/bash.bashrc && \ From 3546733bff7a7bdc16d8a58df606511e5fb88910 Mon Sep 17 00:00:00 2001 From: Warren Van Winckel Date: Mon, 30 Apr 2018 11:03:30 -0700 Subject: [PATCH 2/2] Revert undesired change to Dockerfile --- images/stackstorm/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/images/stackstorm/Dockerfile b/images/stackstorm/Dockerfile index f53d20f6..77e79f50 100644 --- a/images/stackstorm/Dockerfile +++ b/images/stackstorm/Dockerfile @@ -20,10 +20,7 @@ RUN DEBIAN_FRONTEND=noninteractive \ crudini \ uuid-runtime \ apache2-utils \ - bash-completion \ - libkrb5-dev - -#software-properties-common \ + bash-completion # enable bash-completion RUN dpkg-divert /etc/bash.bashrc && \