diff --git a/Dockerfile b/Dockerfile index 793ce15..1743cee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ LABEL org.opencontainers.image.source="https://github.com/your-repo/picobot" # Avoid interactive prompts ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Asia/Shanghai # Configure domestic mirrors for pip, uv, npm (China) ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ @@ -27,6 +28,7 @@ ENV UV_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ # Install base tools, Python, and uv in one layer to reduce duplication RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + tzdata \ tini \ curl \ gnupg \ @@ -45,6 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-pip \ python3-venv \ + && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ && rm -rf /var/lib/apt/lists/* \ && pip3 install --no-cache-dir --break-system-packages uv diff --git a/docker-compose.yml b/docker-compose.yml index 3162df5..924d05c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: - picobot_data:/app/.picobot environment: - RUST_LOG=info + - TZ=Asia/Shanghai command: gateway volumes: