forked from gcallah/docker-for-ed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
133 lines (85 loc) · 2.55 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
DOCKER_USER = gcallah
# Docker commands:
build-images: build-cpp build-pl build-java
build-docker-images: build-docker-cpp build-docker-pl build-docker-java
pull-images: pull-cpp pull-pl pull-java
tag-images: tag-cpp tag-pl tag-java
push-images: push-cpp push-pl push-java
# For each image below, maintain the order:
# 1. build-<image>
# 2. build-docker-<image>
# 3. run-interactive-<image>
# 4. pull-<image>
# 5. tag-<image>
# 6. push-<image>
## CPP Image
build-cpp:
docker build -t cplusplus docker_images/cpp/ --cache-from $(DOCKER_USER)/cplusplus
build-docker-cpp:
docker build -t $(DOCKER_USER)/cplusplus docker_images/cpp/ --cache-from $(DOCKER_USER)/cplusplus
run-interactive-cpp:
docker run --rm -it --name cppcontainer $(DOCKER_USER)/cplusplus sh
pull-cpp:
docker pull $(DOCKER_USER)/cplusplus || true
tag-cpp:
docker tag $(DOCKER_USER)/cplusplus cplusplus || true
push-cpp:
docker push $(DOCKER_USER)/cplusplus
## PL Image
build-pl:
docker build -t pl docker_images/pl/ --cache-from $(DOCKER_USER)/pl
build-docker-pl:
docker build -t $(DOCKER_USER)/pl docker_images/pl/ --cache-from $(DOCKER_USER)/pl
run-interactive-pl:
docker run --rm -it --name plcontainer $(DOCKER_USER)/pl sh
pull-pl:
docker pull $(DOCKER_USER)/pl || true
tag-pl:
docker tag $(DOCKER_USER)/pl pl || true
push-pl:
docker push $(DOCKER_USER)/pl
## OS Image
## Java Image
build-java:
docker build -t java docker_images/java/ --cache-from $(DOCKER_USER)/java
build-docker-java:
docker build -t $(DOCKER_USER)/java docker_images/java/ --cache-from $(DOCKER_USER)/java
run-interactive-java:
docker run --rm -it --name javacontainer $(DOCKER_USER)/java bash
pull-java:
docker pull $(DOCKER_USER)/java || true
tag-java:
docker tag $(DOCKER_USER)/java java || true
push-java:
docker push $(DOCKER_USER)/java
## Big Data Image
## Docker For Edu React docs
build-docs-image:
docker build -t d4ed-image frontend
run-docs-interactive:
docker run --rm -it --name d4ed-container d4ed-image sh
run-docs:
docker run --rm -it -p 3000:3000 --name d4ed-container d4ed-image
# React gh-pages commands:
build-docs-local:
- rm -r static || true
- rm precache-manifest* || true
- cd frontend && \
npm run build && \
cp favicon.ico build && \
cp -r build/* .. && \
cd ..
run-docs-local:
cd frontend && \
npm start
# Tests
test-pl:
pytest -v tests/test_docker-pl.py
test-cpp:
pytest -v tests/test_docker-cpp.py
test-os:
pytest -v tests/test_docker-os.py
test-java:
pytest -v tests/test_docker-java.py
tests: test-cpp test-os test-pl test-java
nose2 -Cv tests