NAME=datax-admin VERSION=latest BUILD_TIME := $(shell date "+%F %T") COMMIT_SHA1 := $(shell git rev-parse HEAD) AUTHOR := $(shell git show -s --format='%an') REMOTE_WORKSPACE=/home/sxwl1070/zhangli/bigdata/datax-admin USER=sxwl1070 HOST=192.168.199.107 .PHONY: image publish all: image publish image: @docker build --target image-dev -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION) . publish: @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION) pull: @docker pull registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION) deploy: image @docker-compose down && docker-compose up -d remote: @ssh -t $(USER)@$(HOST) "cd $(REMOTE_WORKSPACE); make deploy"