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
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
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 }}
FNOSP
App.Bin.note
Repository navigation
Code
Issues
1
(1)
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
App.Bin.note
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
49 lines (37 loc) · 1.15 KB
main
Breadcrumbs
App.Bin.note
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
49 lines (37 loc) · 1.15 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM alpine:3.19
# 安装调试工具
RUN apk add --no-cache \
ca-certificates \
tzdata \
curl \
vim \
htop \
net-tools \
libc6-compat \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 创建用户
RUN addgroup -g 1000 -S note && \
adduser -u 1000 -S note -G note
WORKDIR /app
# 复制二进制文件和启动脚本
COPY --chown=note:note ./app/server/note .
COPY --chown=note:note entrypoint.sh .
# 设置执行权限
RUN chmod +x note entrypoint.sh
# 设置所有者
RUN chown -R note:note /app
# 创建统一的数据根目录,并通过软链将 app 默认使用的 data/uploads/backup 指向 /mnt/note 下
# 这样用户只需映射 /mnt/note 一个目录即可持久化所有数据
RUN mkdir -p /mnt/note && \
ln -s /mnt/note/data /app/data && \
ln -s /mnt/note/uploads /app/uploads && \
ln -s /mnt/note/backup /app/backup && \
chown -R note:note /mnt/note
USER note
# 声明需要挂载的卷(仅需映射一个目录即可持久化所有数据)
VOLUME ["/mnt/note"]
EXPOSE 10029 10030
# 设置环境变量默认值
ENV DATA_SHARE_PATHS=""
# 使用启动脚本
ENTRYPOINT ["./entrypoint.sh"]
You can’t perform that action at this time.