-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (23 loc) · 958 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
include makefile.env
PROJECT=$(DOCKER_IMAGE_NAME)
DOCKER_NAME_FULL=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
DOCKER_LOCALHOST=$(shell /sbin/ifconfig docker0 | pcregrep 'inet addr:' | cut -d: -f2 | awk '{ print $$1}')
up:
@docker-compose -p $(DOCKER_CONTAINER_NAME) up -d
down:
@docker-compose -p $(DOCKER_CONTAINER_NAME) down
ver:
echo version: ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}
build-volume:
# build docker volume
@docker volume create --name db-volume --opt type=local --opt device=/home/marc/slrgessi/db-volume --opt o=bind
build:
# build docker image
@docker build -t $(DOCKER_NAME_FULL) .
save-image:
@mkdir -p docker-images
@docker save com.webapp.gessi/gessi-slr:1.1.0 | gzip > "./docker-images/gessi-slr.tar.gz"
@docker save opavlova/db-derby:latest | gzip > "./docker-images/db-derby.tar.gz"
save-image-tomcat:
@mkdir -p docker-images
@docker save com.webapp.gessi/gessi-slr:1.1.0 | gzip > "./docker-images/gessi-slr.tar.gz"