Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Small and medium teams
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
xiaohanqing
tvguard
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
tvguard
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
35 lines (26 loc) · 1.47 KB
main
Breadcrumbs
tvguard
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
35 lines (26 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
FROM python:3.12-slim
# pip 走国内镜像,避免服务器直连 PyPI 失败;构建时可覆盖:
# docker compose build --build-arg PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
RUN apt-get update && apt-get install -y --no-install-recommends curl unzip \
&& rm -rf /var/lib/apt/lists/*
# WORKDIR 必须在所有 COPY 之前,否则代码会被复制到根目录
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -i ${PIP_INDEX_URL} -r requirements.txt
COPY . .
# platform-tools:优先用项目目录里预下载的 zip,其次 Google 官方源,再试华为镜像源。
# 解压后显式加执行位并自验 adb 可运行。
RUN set -e; \
if [ -f platform-tools-latest-linux.zip ]; then ZIP=platform-tools-latest-linux.zip; \
elif [ -f pt.zip ]; then ZIP=pt.zip; \
elif curl -fsSLo pt.zip https://dl.google.com/android/repository/platform-tools-latest-linux.zip; then ZIP=pt.zip; \
elif curl -fsSLo pt.zip https://mirrors.huaweicloud.com/android/repository/platform-tools-latest-linux.zip; then ZIP=pt.zip; \
else echo "!! 无法下载 platform-tools:请手动下载 platform-tools-latest-linux.zip 放到项目目录后重新构建"; exit 1; fi; \
unzip -q "$ZIP" -d /opt && rm -f "$ZIP"; \
chmod +x /opt/platform-tools/adb; \
/opt/platform-tools/adb version
ENV PATH="/opt/platform-tools:${PATH}"
VOLUME /app/data
EXPOSE 8787
CMD ["python", "run.py"]
You can’t perform that action at this time.