-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (29 loc) · 900 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
all: help
help:
@echo ""
@echo "-- Help Menu"
@echo ""
@echo " 1. make build - Build image"
@echo " 2. make run - Start Container Use default setting (listen web on 8080 , ssh on 8022)"
@echo " 3. make test - Send php -v to container"
@echo " 4. make bash - exec bash on container"
@echo " 5. make clear - Remove alive container"
build:
@echo "Starting build Docker image..."
@docker build --tag=$${USER}/php7 .
run:
@echo "Start Container Use default setting (listen web on 8080 , ssh on 8022)"
@docker run -d \
--name $${USER}-php7 \
-p 8080:80 \
-p 8022:22 \
$${USER}/php7
test:
@echo "Run \"php -v\" on container..."
@docker exec $${USER}-php7 php -v
bash:
@echo "Run bash on container..."
@docker exec -it $${USER}-php7 bash
clear:
@echo "Remove container..."
@docker rm -f $${USER}-php7