Skip to content

Instantly share code, notes, and snippets.

@jbrisbin
Created August 26, 2016 14:23
Show Gist options
  • Save jbrisbin/98a91dbb754b4cd42373a0d402b4efe8 to your computer and use it in GitHub Desktop.
Save jbrisbin/98a91dbb754b4cd42373a0d402b4efe8 to your computer and use it in GitHub Desktop.
Makefile to build multiple build-essential images from a single set
BUILD_BASE ?= y
UPGRADE ?= y
DOCKER ?= y
FPM ?= y
JAVA ?= y
FROM ?= ubuntu:14.04
MAINTAINER = Jon Brisbin <jbrisbin@basho.com>
OS_FAMILY = $(shell echo "$(FROM)" | cut -d: -f1)
OS_VERSION = $(shell echo "$(FROM)" | cut -d: -f2)
OS_TAG = $(shell echo "$(FROM)" | tr : -)
TAG = basho/build-essential:$(OS_TAG)
OVERLAY_DIRS = $(OS_FAMILY) .
OVERLAYS = env env-$(OS_VERSION)
ifeq (y,$(BUILD_BASE))
OVERLAYS += build-base build-base-py git-ssh
endif
ifeq (y,$(DOCKER))
OVERLAYS += docker
endif
ifeq (y,$(FPM))
OVERLAYS += fpm
endif
ifeq (y,$(JAVA))
OVERLAYS += openjdk-8 maven sbt
endif
ifeq (y,$(UPGRADE))
OVERLAYS += upgrade
endif
-include ../../docker.mk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment