Skip to content

Commit a01c61d

Browse files
authored
simple build file to create and push image
1 parent f1ee067 commit a01c61d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Makefile for building easy-jupyter container
2+
#
3+
# Reference Guide - https://www.gnu.org/software/make/manual/make.html
4+
5+
6+
#
7+
# Internal variables or constants.
8+
# NOTE - These will be executed when any make target is invoked.
9+
#
10+
IS_DOCKER_INSTALLED := $(shell which docker >> /dev/null 2>&1; echo $$?)
11+
12+
help:
13+
@echo ""
14+
@echo "Usage:-"
15+
@echo "\tmake build -- will build create the docker image"
16+
@echo ""
17+
18+
19+
_build_check_docker:
20+
@if [ $(IS_DOCKER_INSTALLED) -eq 1 ]; \
21+
then echo "" \
22+
&& echo "ERROR:\tdocker is not installed. Please install it before build." \
23+
&& echo "" \
24+
&& exit 1; \
25+
fi;
26+
27+
deps: _build_check_docker
28+
@echo ""
29+
@echo "INFO:\tverifying dependencies for easy-jupyter ..."
30+
31+
_build_image:
32+
@echo "INFO: Building container image for easy-jupyter"
33+
build -t openebs/easy-jupyter .
34+
35+
_push_image:
36+
@echo "INFO: Publish container (openebs/easy-jupyter)"
37+
cd buildscripts && ./push
38+
39+
build: deps _build_image _push_image
40+
41+
#
42+
# This is done to avoid conflict with a file of same name as the targets
43+
# mentioned in this makefile.
44+
#
45+
.PHONY: help deps build
46+
.DEFAULT_GOAL := build

0 commit comments

Comments
 (0)