-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
52 lines (33 loc) · 999 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
50
51
docker_name=nmrpro
port=-p 127.0.0.1:8008:8000
log_path=/var/log/nmrpro.log
WEB_TAG=1.1.0
WEB_TARGET=emetabohub/${docker_name}:${WEB_TAG}
re:clean docker
push_hub: docker hub_login do_push remove_hub_credentials
do_push:
docker push ${WEB_TARGET}
hub_login:
cat .password | docker login --username=$$(cat ./.username) --password-stdin
remove_hub_credentials:hub_logout
rm ~/.docker/config.json
hub_logout:
docker logout
docker_logout:
docker logout
docker:
@docker build -t $(docker_name) .
@docker tag ${docker_name}:latest ${WEB_TARGET}
clean:
docker kill `docker ps | grep -Poe '[a-z0-9]{12}'` || true
docker container prune
docker rmi $(docker_name) || true
it:
docker run -it -v /home/lain/Desktop/inrae/NMRPro_galaxy/data:/nmrpro_server/data $(port) $(docker_name)
d:
docker run -d $(port) $(docker_name)
sh:
docker exec -i `docker ps | grep -Poe '^[a-z0-9]{12}'` bash
log:
docker exec `docker ps | grep -Poe '^[a-z0-9]{12}'` tail -f $(log_path)
.PHONY:log R