-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
35 lines (26 loc) · 797 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
#
# Makefile to help with building and testing the adtools image.
#
REPOSITORY := ssolie/adtools
TAG := latest
VOLUMES := "${PWD}/code":/opt/code
WORKSPACE := /opt/code
CONTAINER := adtools
DOCKERFILE := Dockerfile.adtools
.PHONY: help build push shell logs clean
help:
@echo "build - builds the adtools image"
@echo "push - push the adtools image to Docker Hub"
@echo "shell - starts container based on the adtools image"
@echo "logs - display container logs"
@echo "clean - remove container"
build:
docker build -f $(DOCKERFILE) -t $(REPOSITORY):$(TAG) .
push:
docker push $(REPOSITORY):$(TAG)
shell:
docker run -it --name $(CONTAINER) -v $(VOLUMES) -w $(WORKSPACE) $(REPOSITORY):$(TAG) /bin/bash
logs:
docker logs $(CONTAINER)
clean:
-docker rm -f $(CONTAINER)