forked from SWI-Prolog/docker-swish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.06 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
VOLUME=$(shell pwd)
RESTART=--restart unless-stopped
PORT=3050
WITH_R=--volumes-from=rserve
PUBLISH=--publish=${PORT}:3050
DOPTS=--rm ${PUBLISH} -v ${VOLUME}:/data ${WITH_R}
IMG=swipl/swish
all:
@echo "Targets"
@echo
@echo "image Build the swish image"
@echo "run Run the image (detached)"
@echo "authenticated Run the image in authenticated mode"
@echo "social Run the image with social login"
@echo "add-user Add a user for authenticated mode"
@echo "interactive Run the image interactively"
image::
docker build --build-arg SWISH_SHA1=5edfaf1 -t $(IMG) .
run:
docker run --detach ${DOPTS} $(IMG)
authenticated:
docker run --detach ${DOPTS} $(IMG) --authenticated
social:
docker run --detach ${DOPTS} $(IMG) --social
interactive:
docker run -it ${DOPTS} $(IMG)
add-user:
docker run -it ${DOPTS} $(IMG) --add-user
help:
docker run -it ${DOPTS} $(IMG) --help
push:
docker push $(IMG):latest
install-rserve:
-docker stop rserve
-docker rm rserve
docker run -d $(RESTART) --net=none --name=rserve swipl/rserve