makefile
學習紀錄
#!/usr/bin/make -f
IMAGE := laravel
VERSION := latest
.PHONY: all build rebuild shell run
CUR_DIR = $(shell pwd)
LARADOCK_DIR = $(CUR_DIR)/laradock
# ------------------------------------------------------------------------------
# all: build
# # 建置 image
# build:
# docker build -t=$(IMAGE):$(VERSION) .
# # 不使用 cache 建置 image
# rebuild:
# docker build -t=$(IMAGE):$(VERSION) --no-cache .
# # 執行並使用 shell 進入 container
# shell:
# docker run --rm -it -p 8000:8000 $(IMAGE):$(VERSION) bash
# # 執行 container
# run:
# docker run --rm -it -p 8000:8000 $(IMAGE):$(VERSION)
u:
cd $(LARADOCK_DIR) && docker-compose up -d nginx mysql redis
d:
cd $(LARADOCK_DIR) && docker-compose down
c:
cd $(LARADOCK_DIR) && docker-compose exec workspace bash
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up