Makefile 400 B

123456789101112
  1. DOCKER_IMAGE_NAME=hx-admin-web
  2. DOCKER_REMOTE_IMAGE_NAME=registry.cestong.com:8150/zhixueyun/${DOCKER_IMAGE_NAME}
  3. docker-build:
  4. docker build . -t ${DOCKER_IMAGE_NAME}
  5. docker-push: docker-build
  6. docker tag ${DOCKER_IMAGE_NAME} ${DOCKER_REMOTE_IMAGE_NAME}
  7. docker push ${DOCKER_REMOTE_IMAGE_NAME}
  8. deploy-test: docker-push
  9. ssh cest-2 'cd hx-admin-web && docker-compose pull && docker-compose up -d'