Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
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 }}
HeyJiqingCode
BidCopilot
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
BidCopilot
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
30 lines (23 loc) · 1.3 KB
main
Breadcrumbs
BidCopilot
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
30 lines (23 loc) · 1.3 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
# 智能投标助手 —— 部署镜像(Azure Container Apps)
# 纯 Python 服务:FastAPI + uvicorn。包在 src/ 下,靠 PYTHONPATH=src 导入(无 pip 安装)。
# .doc 解析仅走 Azure Content Understanding(FOUNDRY_CU_BASE_URL),镜像内不含本地转换器。
FROM python:3.14-slim
# 不写 .pyc、日志不缓冲(容器日志实时可见)
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/src
WORKDIR /app
# 先装依赖(单独一层,利用构建缓存:requirements 不变则不重装)
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# 再拷源码与前端静态资源(main.py 用 src/web 提供 /static 与页面)
COPY src/ ./src/
# Container Apps 通过 ingress targetPort 路由到此端口;用 $PORT 兼容平台注入,缺省 8080
ENV PORT=8080
EXPOSE 8080
# 以非 root 运行(安全基线);把 /app 所有权交给 appuser,
# 使其能在工作目录下创建运行时产物目录 runs/(上传/跑任务时 mkdir),否则非 root 写会被拒
RUN useradd -m appuser && chown -R appuser:appuser /app
USER appuser
# 启动 FastAPI 应用(单进程;Container Apps 靠多副本水平扩展,不在容器内开多 worker)
CMD ["sh", "-c", "uvicorn bid_copilot.api.main:app --host 0.0.0.0 --port ${PORT}"]
You can’t perform that action at this time.