-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
36 lines (28 loc) · 838 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
35
36
# This line allows for using spaces instead of tabs for indentation
.RECIPEPREFIX +=
.DEFAULT_GOAL := all
SHELL=/bin/bash
CONTAINER_TAG=lucasvanlierop/containerization-workshop:latest
CONTAINER_NAME=lucasvanlierop-containerization-workshop
all: build_container_image
build_container_image:
docker build -f Dockerfile -t ${CONTAINER_TAG} .
start_container: build_container_image
docker run \
-d \
-p 80:80 \
--name ${CONTAINER_NAME} \
-t ${CONTAINER_TAG}
start_dev_container: build_container_image
docker kill ${CONTAINER_NAME};
docker rm ${CONTAINER_NAME}
docker run \
-v `pwd`/web:/var/www/html \
-d \
-p 80:80 \
--name ${CONTAINER_NAME} \
-t ${CONTAINER_TAG}
test: start_container
tests/smoke-test.sh
docker kill ${CONTAINER_NAME};
docker rm ${CONTAINER_NAME}