forked from itteco/iframely
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (70 loc) · 1.38 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
CONTAINER := iframely
HUB_USER := ${USER}
IMAGE_NAME := ${HUB_USER}/${CONTAINER}
VERSION := ${VERSION}
EXPOSEPORT := 8061
PUBLISHPORT := ${EXPOSEPORT}
build:
git fetch upstream
git checkout master
git merge upstream/master
git branch -f tag-${VERSION}
git checkout tag-${VERSION}
docker \
build \
--pull \
--rm --tag=${CONTAINER} .
@echo Image tag: ${VERSION}
start: run
run:
docker \
run \
--detach \
--interactive \
--tty \
--hostname=${CONTAINER} \
--name=${CONTAINER} \
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
-p ${PUBLISHPORT}:${EXPOSEPORT} \
-v ${PWD}/config.local.js:/iframely/config.local.js \
$(CONTAINER)
shell:
docker \
run \
--rm \
--interactive \
--tty \
--hostname=${CONTAINER} \
--name=${CONTAINER} \
-p ${PUBLISHPORT}:${EXPOSEPORT} \
--entrypoint "/bin/ash" \
-v ${PWD}/config.local.js:/iframely/config.local.js \
$(CONTAINER)
exec:
docker exec \
--interactive \
--tty \
--rm \
${CONTAINER} \
/bin/ash
stop:
-docker kill ${CONTAINER}
-docker rm ${CONTAINER}
rm:
docker \
rm ${CONTAINER}
history:
docker \
history ${CONTAINER}
clean:
-docker \
rm ${CONTAINER}
-docker \
rmi ${CONTAINER}
git branch -d tag-${VERSION}
push:
docker tag ${CONTAINER} ${IMAGE_NAME}:${VERSION}
docker tag ${CONTAINER} ${IMAGE_NAME}:latest
docker push ${IMAGE_NAME}:${VERSION}
docker push ${IMAGE_NAME}
restart: stop clean run