-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 928 Bytes
/
Makefile
File metadata and controls
42 lines (30 loc) · 928 Bytes
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
DOCKER_FILE=Dockerfile
IMAGE_NAME=diobench
IMAGE_TAG=latest
RUN_NAME=diob
all: build-image
build-image:
docker build -f $(DOCKER_FILE) -t $(IMAGE_NAME) .
run:
docker run -tid --name $(RUN_NAME) $(IMAGE_NAME)
# do a sample run of 4 I/O of 4K each
dio:
#docker exec -ti $(RUN_NAME) /bin/diobench --hello /data 4 4096
#docker exec -ti $(RUN_NAME) /bin/diobench --fio /data fio_seq_RW
docker exec -ti $(RUN_NAME) /bin/diobench --vdb /data sample
# get a shell to the container in the background
shell:
docker exec -ti $(RUN_NAME) /bin/bash
show:
docker images $(IMAGE_NAME)
stop:
- docker stop $(RUN_NAME)
- docker rm $(RUN_NAME)
# create a tarball of the docker image so it can be manually pushed around
tar-image:
- docker save $(IMAGE_NAME) > $(IMAGE_NAME).tar
- gzip $(IMAGE_NAME).tar
import-image:
- docker import $(IMAGE_NAME).tar.gz $(IMAGE_NAME):$(IMAGE_TAG)
clean: stop
- docker rmi $(IMAGE_NAME)