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 }}
letsopen
ProMonitor
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
ProMonitor
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
30 lines (28 loc) · 1.46 KB
main
Breadcrumbs
ProMonitor
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
30 lines (28 loc) · 1.46 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
# syntax=docker/dockerfile:1
# 纯运行期镜像:Go 二进制与前端 dist 全部由 GitHub Actions 编译产出,
# 镜像内不执行任何编译(无 golang/node 构建阶段)。
# - bin/promonitor-{server,agent}_linux_amd64 由 build-binaries 工作流交叉编译
# - dist/ 由 docker-image 工作流的前端 job 构建
# CI 在 docker build 前把两份产物下载到构建上下文,这里仅做组装。
# 注意:本 Dockerfile 仅供 CI 使用,本地 docker build 需先自行准备 bin/ 与 dist/。
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
ENV PORT=9000 \
DB_PATH=/app/data/promonitor.db \
FRONTEND_DIR=/app/dist \
HMAC_SECRET="" \
ADMIN_PASS="" \
SESSION_SECRET="change-me-session-secret"
# CI 预编译的静态二进制(CGO_ENABLED=0,可直接跑在 alpine/musl 上)
COPY bin/promonitor-server_linux_amd64 /usr/local/bin/promonitor-server
COPY bin/promonitor-agent_linux_amd64 /usr/local/bin/promonitor-agent
# GitHub Actions artifact 下载可能丢失可执行权限位,缺失 +x 会导致 runc 报
# "exec: ...: executable file not found in $PATH"(Go exec.LookPath 对无 x 位文件的行为),
# 这里显式补回执行权限(仅改权限,不算编译)。
RUN chmod +x /usr/local/bin/promonitor-server /usr/local/bin/promonitor-agent
# CI 构建的前端产物
COPY dist/ /app/dist
EXPOSE 9000
VOLUME ["/app/data"]
CMD ["promonitor-server"]
You can’t perform that action at this time.