From 74bde0f6f3bfbb4457b02e6ea138fa014ccc40f9 Mon Sep 17 00:00:00 2001 From: Mark Burnett Date: Mon, 24 Jul 2017 12:28:05 -0500 Subject: [PATCH] Add image build dev script --- docs/getting-started.md | 2 ++ tools/dev-build.sh | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 tools/dev-build.sh diff --git a/docs/getting-started.md b/docs/getting-started.md index 83205fde..5e3f7d89 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -57,6 +57,8 @@ Then on a node: PROMENADE_LOAD_IMAGE=/vagrant/promenade.tar bash /vagrant/up.sh /vagrant/path/to/node-config.yaml ``` +These commands are combined in a convenience script at `tools/dev-build.sh`. + To build the image from behind a proxy, you can: ```bash diff --git a/tools/dev-build.sh b/tools/dev-build.sh new file mode 100755 index 00000000..5852cbbe --- /dev/null +++ b/tools/dev-build.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -ex + +echo === Cleaning up old data === +rm -rf promenade.tar configs +mkdir configs + +echo === Building image === +docker build -t quay.io/attcomdev/promenade:latest . + +echo === Generating updated configuration === +docker run --rm -t \ + -v $(pwd):/target quay.io/attcomdev/promenade:latest \ + promenade -v \ + generate \ + -c /target/example/vagrant-input-config.yaml \ + -o /target/configs + +echo === Saving image === +docker save -o promenade.tar quay.io/attcomdev/promenade:latest + +echo === Done ===