-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (32 loc) · 937 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# Authors:
# - Abhimanyu Saharan <[email protected]>
#
REGISTRY_HOST=docker.io
USERNAME=kryptosteam
NAME=daemon
IMAGE=$(REGISTRY_HOST)/$(USERNAME)/$(NAME)
VERSION=latest
SHELL=/bin/bash
DOCKER_BUILD_CONTEXT=.
DOCKER_FILE_PATH=Dockerfile
.PHONY: pre-build docker-build post-build build push pre-push do-push post-push run
help:
@echo 'Usage: make [TARGET]'
@echo
@echo 'Targets:'
@echo ' build builds a new version of your Docker image and tags it'
@echo ' push push the image to your registry'
@echo ' run run the latest image'
build: pre-build docker-build post-build
pre-build:
post-build:
pre-push:
post-push:
run:
docker run $(IMAGE):$(VERSION) --name $(NAME)
docker-build:
docker build $(DOCKER_BUILD_ARGS) -t $(IMAGE):$(VERSION) $(DOCKER_BUILD_CONTEXT) -f $(DOCKER_FILE_PATH)
push: pre-push do-push post-push
do-push:
docker push $(IMAGE):$(VERSION)