1
0
mirror of https://github.com/phusion/baseimage-docker.git synced 2026-03-25 20:07:55 +00:00

Default to ubuntu BASE_IMAGE in Dockerfile, modify make to only add --build-arg to build target if BASE_IMAGE is defined, document the use of BASE_IMAGE in README

This commit is contained in:
Matyas Markovics
2019-04-08 09:45:37 +02:00
parent 6d6395c58f
commit 36bd41108f
3 changed files with 21 additions and 7 deletions

View File

@@ -1,10 +1,11 @@
ifndef BASE_IMAGE
BASE_IMAGE = ubuntu:18.04
NAME ?= phusion/baseimage
else ifdef NAME
else
ifdef BASE_IMAGE
BUILD_ARG = --build-arg BASE_IMAGE=$(BASE_IMAGE)
ifndef NAME
NAME = phusion/baseimage-$(subst :,-,${BASE_IMAGE})
endif
else
NAME ?= phusion/baseimage
endif
VERSION ?= 0.11
@@ -13,7 +14,7 @@ VERSION ?= 0.11
all: build
build:
docker build -t $(NAME):$(VERSION) --build-arg BASE_IMAGE=$(BASE_IMAGE) --rm image
docker build -t $(NAME):$(VERSION) $(BUILD_ARG) --rm image
test:
env NAME=$(NAME) VERSION=$(VERSION) ./test/runner.sh