DOCKER=docker
SOURCE_DIR=src
BIN_NAME=bin_rec
REGISTRY=registry.cn-hangzhou.aliyuncs.com/ali-recommend
DOCKER_TAG=0.0.10
TEMP_DIR_SERVER:=$(shell mktemp -d)

cd ${SOURCE_DIR}; mv ${BIN_NAME} ${TEMP_DIR_SERVER}/appd
cp docker/Dockerfile ${TEMP_DIR_SERVER}/
cp conf/config.json.production ${TEMP_DIR_SERVER}/config.json
cd ${TEMP_DIR_SERVER}  &&  ${DOCKER} build  -t ${REGISTRY}/${BIN_NAME}:${DOCKER_TAG} .
${DOCKER} push ${REGISTRY}/${BIN_NAME}:${DOCKER_TAG}


