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/sxkj/liweiquan/datax-admin USER=sxkj HOST=192.168.199.110 .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" idctest: @docker build --target image-idctest -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):idctest . @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):idctest sxkj: @docker build --target image-sxkj -t SXKJ:32775/$(NAME):sxkj . @docker push SXKJ:32775/$(NAME):sxkj txtest: @docker build --target image-test -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):txtest . @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):txtest txprod: @docker build --target image-txprod -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):txprod . @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):txprod rsync: @rsync -azP --exclude ".*/" --exclude "tmp/" `pwd` sxkj@192.168.199.109:/home/sxkj/zhangli/