Created
August 28, 2019 12:38
-
-
Save hsteinshiromoto/0742673c13c0d2726b0e141d2f38e742 to your computer and use it in GitHub Desktop.
Wordpress: Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- | |
# Global Variables | |
# --- | |
SHELL:=/bin/bash | |
docker_user = docker_username | |
registry = docker_registry | |
project_name = $(shell basename $(shell pwd)) | |
tag = latest | |
build_date=$(shell date +%Y%m%d-%H:%M:%S) | |
docker_image=${registry}/${docker_user}/${project_name}:${tag} | |
# --- | |
# Targets | |
# --- | |
default: build | |
# Build Container | |
build: | |
@echo "Building Container ${docker_image}" | |
docker build \ | |
--build-arg BUILD_DATE=${build_date} \ | |
--build-arg PROJECT_NAME=${project_name} -t ${docker_image} . | |
.PHONY: build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment