File size: 1,002 Bytes
198ccb0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/bin/bash
# Build script for Docker images
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Building Docker images...${NC}"
# Build production image
echo -e "${YELLOW}Building production image...${NC}"
docker build \
--target production \
-t news-classifier-api:latest \
-t news-classifier-api:production \
-f Dockerfile \
.
# Build development image
echo -e "${YELLOW}Building development image...${NC}"
docker build \
-t news-classifier-api:dev \
-f Dockerfile.dev \
.
# Build training image
echo -e "${YELLOW}Building training image...${NC}"
docker build \
--target training \
-t news-classifier-api:training \
-f Dockerfile \
.
echo -e "${GREEN}All images built successfully!${NC}"
echo ""
echo "Available images:"
echo " - news-classifier-api:latest (production)"
echo " - news-classifier-api:dev (development)"
echo " - news-classifier-api:training (training)"
|