build.sh 496 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Image configuration
  3. VERSION="1.0.0"
  4. LOCAL_IMAGE="eps2svg:v${VERSION}"
  5. REGISTRY="registry.cn-chengdu.aliyuncs.com/infish"
  6. REGISTRY_IMAGE="${REGISTRY}/${LOCAL_IMAGE}"
  7. # Build local image
  8. echo "Building local image: ${LOCAL_IMAGE}"
  9. docker build -t ${LOCAL_IMAGE} .
  10. # Tag for registry
  11. echo "Tagging image for registry: ${REGISTRY_IMAGE}"
  12. docker tag ${LOCAL_IMAGE} ${REGISTRY_IMAGE}
  13. # Push to registry (uncomment to push)
  14. echo "Pushing to registry..."
  15. docker push ${REGISTRY_IMAGE}