Skip to content

Instantly share code, notes, and snippets.

@jmervine
Last active November 28, 2018 18:53
Show Gist options
  • Save jmervine/5725482f92874da4f8bdd119c97f2aae to your computer and use it in GitHub Desktop.
Save jmervine/5725482f92874da4f8bdd119c97f2aae to your computer and use it in GitHub Desktop.
# Override github.com/splunk/docker-splunk build args
# ---
# SPLUNK_ANSIBLE_BRANCH ?= master
# SPLUNK_VERSION ?= 7.2.0
# SPLUNK_BUILD ?= 8c86330ac18
# Choose a github.com/splunk/docker-splunk branch to deploy
DOCKER_SPLUNK_BRANCH ?= master
IMAGE ?= splunk-edge
help: ## Show help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/:\( *[^ #]*\)*/:\1/' | sed -e 's/##//'
clean: ## Remove docker-splunk artifact directory
clean:
rm -rf docker-splunk
docker-splunk: ## Fetch github.com/splunk/docker-splunk
docker-splunk:
git clone https://github.com/splunk/docker-splunk.git --branch $(DOCKER_SPLUNK_BRANCH)
build: ## Build the image after updating dependencies
build: clean build/only
build/only: ## Only build the image.
build/only: docker-splunk
$(MAKE) -C docker-splunk splunk \
SPLUNK_VERSION=$(SPLUNK_VERSION) \
SPLUNK_BUILD=$(SPLUNK_BUILD) \
SPLUNK_ANSIBLE_BRANCH=$(SPLUNK_ANSIBLE_BRANCH)
docker tag splunk-debian-9:latest $(IMAGE):$(SPLUNK_VERSION)
.PHONY: help clean build build/only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment