# ================================================
# Urban Lifeline - 后端基础镜像
# 包含 JRE 21 + 常用工具
# 构建命令: docker build -t urban-lifeline-base-serv:latest -f Dockerfile.base .
# ================================================
FROM eclipse-temurin:21-jre-alpine

# 设置环境变量
ENV LANG=C.UTF-8 \
    LC_ALL=C.UTF-8 \
    TZ=Asia/Shanghai

# 使用阿里云镜像源（解决网络问题）
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

# 安装基础工具
RUN apk add --no-cache \
    curl \
    wget \
    bash \
    tzdata \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone

# 创建应用目录
WORKDIR /app
RUN mkdir -p /app/config /app/logs

# 镜像元数据
LABEL maintainer="Urban Lifeline Team" \
      description="Base image for Urban Lifeline backend services" \
      version="1.0"

# 默认命令
CMD ["echo", "This is base image, please use specific service image"]
