-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (24 loc) · 946 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
PORTS = 5000:5000
VERSION = latest
IMAGE_NAME = biomedbigdata/sponge-web-backend
CONTAINER_NAME = sponge-web-backend
CONTAINER_INSTANCE = default
build:
docker build -t $(IMAGE_NAME):$(VERSION) .
push: build
echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
docker tag $(IMAGE_NAME) $(IMAGE_NAME):$(VERSION)
docker push $(IMAGE_NAME):$(VERSION)
shell:
docker run --rm --name $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) -i -t $(PORTS) $(VOLUMES) $(ENV) $(IMAGE_NAME):$(VERSION) /bin/bash
run:
docker run --rm --name $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(IMAGE_NAME):$(VERSION)
start:
docker run --rm --name=$(CONTAINER_NAME)-$(CONTAINER_INSTANCE) -it -d -p $(PORTS) $(IMAGE_NAME):$(VERSION)
stop:
docker stop $(CONTAINER_NAME)-$(CONTAINER_INSTANCE)
rm:
docker rm $(CONTAINER_NAME)-$(CONTAINER_INSTANCE)
release: build
make push -e VERSION=$(VERSION)
travis: push