-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (36 loc) · 1.27 KB
/
Copy pathMakefile
File metadata and controls
51 lines (36 loc) · 1.27 KB
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
SOURCES=$(wildcard *.erl)
BEAMS=$(patsubst %.erl, %.beam, $(SOURCES))
DOCKERFILES=$(wildcard Dockerfile.*)
all: $(BEAMS) containers
%.beam: %.erl
erlc $<
clean:
rm $(BEAMS)
containers: $(BEAMS) $(DOCKERFILES)
docker build -t bionic-erlang -f Dockerfile.erlang .
docker build -t sink -f Dockerfile.sink .
docker build -t source -f Dockerfile.source .
erl-net:
docker network create -d bridge erl-net
start-sink:
docker run --hostname sinkhost --name sinkhost --net erl-net -it sink
docker rm sinkhost
pause-sink:
docker pause sinkhost
resume-sink:
docker unpause sinkhost
start-source:
docker run --hostname sourcehost --name sourcehost --link sinkhost --net erl-net -it source
docker rm sourcehost
start-source-noconnect:
docker run --hostname sourcehost --name sourcehost --link sinkhost --net erl-net -e SOURCE_FLAGS=noconnect -it source
docker rm sourcehost
start-source-nosuspend:
docker run --hostname sourcehost --name sourcehost --link sinkhost --net erl-net -e SOURCE_FLAGS=nosuspend -it source
docker rm sourcehost
start-source-failfast:
docker run --hostname sourcehost --name sourcehost --link sinkhost --net erl-net -e SOURCE_FLAGS=noconnect,nosuspend -it source
docker rm sourcehost
docker-clean:
docker network rm erl-net
.PHONY: all containers clean