|
4 | 4 | set -e
|
5 | 5 |
|
6 | 6 | CACHE="cache"
|
| 7 | +DEPLOY="cache/deploy" |
7 | 8 |
|
8 | 9 | SPLUNK_PRODUCT="splunk"
|
9 | 10 | SPLUNK_HOME="/opt/splunk"
|
|
23 | 24 | #
|
24 | 25 | # Download and cache local copy of Splunk to speed up future builds.
|
25 | 26 | #
|
26 |
| -mkdir -p ${CACHE} |
| 27 | +mkdir -p ${CACHE} ${DEPLOY} |
27 | 28 |
|
28 | 29 | #ls -ltrh $CACHE # Debugging
|
29 | 30 | if test ! -f "${CACHE_FILENAME}"
|
@@ -57,15 +58,39 @@ echo "# Building Docker containers..."
|
57 | 58 | echo "# "
|
58 | 59 |
|
59 | 60 | docker build . -f docker/0-0-core -t splunk-lab-core-0
|
| 61 | + |
| 62 | +# |
| 63 | +# Link in whatever files we need in the deploy directory before building |
| 64 | +# |
| 65 | +ln -f ${CACHE}/splunk-8.1.0.1-24fd52428b5a-Linux-x86_64.tgz ${DEPLOY} |
60 | 66 | docker build \
|
61 | 67 | --build-arg SPLUNK_HOME=${SPLUNK_HOME} \
|
62 |
| - --build-arg CACHE_FILENAME=${CACHE_FILENAME} \ |
| 68 | + --build-arg CACHE_FILENAME=${DEPLOY}/${SPLUNK_FILENAME} \ |
63 | 69 | . -f docker/0-1-splunk -t splunk-lab-core-1
|
64 |
| -docker build . -f docker/0-2-apps -t splunk-lab-core |
| 70 | +rm -f ${DEPLOY}/* |
| 71 | + |
| 72 | +ln -f ${CACHE}/syndication-input-rssatomrdf_124.tgz ${DEPLOY} |
| 73 | +ln -f ${CACHE}/wordcloud-custom-visualization_111.tgz ${DEPLOY} |
| 74 | +ln -f ${CACHE}/slack-notification-alert_203.tgz ${DEPLOY} |
| 75 | +ln -f ${CACHE}/splunk-dashboard-examples_800.tgz ${DEPLOY} |
| 76 | +ln -f ${CACHE}/eventgen_720.tgz ${DEPLOY} |
| 77 | +ln -f ${CACHE}/rest-api-modular-input_198.tgz ${DEPLOY} |
| 78 | +docker build \ |
| 79 | + --build-arg DEPLOY=${DEPLOY} \ |
| 80 | + . -f docker/0-2-apps -t splunk-lab-core |
| 81 | +rm -f ${DEPLOY}/* |
65 | 82 |
|
66 | 83 | docker build . -f docker/1-splunk-lab -t splunk-lab
|
67 | 84 |
|
68 |
| -docker build . -f docker/1-splunk-lab-ml -t splunk-lab-ml |
| 85 | +ln -f ${CACHE}/python-for-scientific-computing-for-linux-64-bit_202.tgz ${DEPLOY} |
| 86 | +ln -f ${CACHE}/splunk-machine-learning-toolkit_520.tgz ${DEPLOY} |
| 87 | +ln -f ${CACHE}/nlp-text-analytics_102.tgz ${DEPLOY} |
| 88 | +ln -f ${CACHE}/halo-custom-visualization_113.tgz ${DEPLOY} |
| 89 | +ln -f ${CACHE}/sankey-diagram-custom-visualization_130.tgz ${DEPLOY} |
| 90 | +docker build \ |
| 91 | + --build-arg DEPLOY=${DEPLOY} \ |
| 92 | + . -f docker/1-splunk-lab-ml -t splunk-lab-ml |
| 93 | +rm -f ${DEPLOY}/* |
69 | 94 |
|
70 | 95 | echo "# "
|
71 | 96 | echo "# Tagging Docker containers..."
|
|
0 commit comments