laravel-base/Makefile

28 lines
733 B
Makefile

VERSION ?= test
.DEFAULT:
@echo 'Invalid target.'
@echo
@echo ' alpine build alpine image'
@echo ' stretch build debian stretch image'
@echo ' all build all image variants'
@echo
@echo ' push build and push images to the registry'
@echo
default: .DEFAULT
alpine:
docker build --pull --target=alpine -t laravel-base:${VERSION}-alpine .
stretch:
docker build --pull --target=stretch -t laravel-base:${VERSION}-stretch .
all: alpine stretch
push: all
docker tag laravel-base:${VERSION}-alpine ${REGISTRY}:${VERSION}-alpine
docker tag laravel-base:${VERSION}-stretch ${REGISTRY}:${VERSION}-stretch
docker push ${REGISTRY}:${VERSION}-alpine
docker push ${REGISTRY}:${VERSION}-stretch