Compare commits

...
3 Commits
Author SHA1 Message Date
github-actions[bot] 287b647da1 chore(master): release 2.5.4 (#501)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-23 14:35:42 +00:00
Lan fbcd4a5b2b Merge pull request #500 from vastsa/fix/docker-run-as-root
fix: run Docker as root for volume compatibility
2026-07-23 22:35:20 +08:00
vastsa fc0cbeb4f0 fix: run Docker image as root for data volume compatibility
Revert the non-root container user so existing deployments with
root-owned data volumes keep working without a manual chown step.
2026-07-23 22:35:00 +08:00
11 changed files with 22 additions and 22 deletions

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
{
".": "2.5.3"
".": "2.5.4"
}
+1 -8
View File
@@ -63,14 +63,7 @@ RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir -r requirements.txt \
&& pip cache purge || true \
&& groupadd --system --gid 1000 appuser \
&& useradd --system --uid 1000 --gid appuser --create-home --home-dir /home/appuser --shell /usr/sbin/nologin appuser \
&& mkdir -p /app/data \
&& chown -R appuser:appuser /app
# 非 root 运行,降低容器逃逸后的主机影响面
USER appuser
&& pip cache purge || true
# 环境变量配置
ENV HOST="0.0.0.0" \
+1 -1
View File
@@ -1 +1 @@
2.5.3
2.5.4
+1 -2
View File
@@ -1,8 +1,7 @@
version: "3"
services:
file-code-box:
image: lanol/filecodebox:2.5.3 # x-release-please-version
user: "1000:1000"
image: lanol/filecodebox:2.5.4 # x-release-please-version
volumes:
- fcb-data:/app/data:rw
restart: unless-stopped
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## [2.5.4](https://github.com/vastsa/FileCodeBox/compare/v2.5.3...v2.5.4) (2026-07-23)
### Bug Fixes
* run Docker as root for volume compatibility ([fbcd4a5](https://github.com/vastsa/FileCodeBox/commit/fbcd4a5b2b788cdfc8e86d920f9c5a7299dc839a))
* run Docker image as root for data volume compatibility ([fc0cbeb](https://github.com/vastsa/FileCodeBox/commit/fc0cbeb4f0c7485d2e7abc0501a5fd9b1456cc22))
## [2.5.3](https://github.com/vastsa/FileCodeBox/compare/v2.5.2...v2.5.3) (2026-07-23)
+1 -1
View File
@@ -1,6 +1,6 @@
## [Unreleased]
<!-- Current release: 2.5.3 x-release-please-version -->
<!-- Current release: 2.5.4 x-release-please-version -->
### Added
+1 -1
View File
@@ -38,7 +38,7 @@ docker run -d --restart unless-stopped \
-p 12345:12345 \
-v ./data:/app/data \
--name filecodebox \
lanol/filecodebox:2.5.3 # x-release-please-version
lanol/filecodebox:2.5.4 # x-release-please-version
```
Open `http://localhost:12345` and complete the first-run setup.
+1 -1
View File
@@ -38,7 +38,7 @@ docker run -d --restart unless-stopped \
-p 12345:12345 \
-v ./data:/app/data \
--name filecodebox \
lanol/filecodebox:2.5.3 # x-release-please-version
lanol/filecodebox:2.5.4 # x-release-please-version
```
打开 `http://localhost:12345`,按引导完成首次初始化。
+1 -1
View File
@@ -24,7 +24,7 @@
## 一条命令开始
```bash
docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.3 # x-release-please-version
docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.4 # x-release-please-version
```
访问 `http://localhost:12345`,完成首次初始化。生产环境建议固定版本号;`latest` 指向最新正式版。
+1 -1
View File
@@ -24,7 +24,7 @@ A lightweight, modern, self-hosted file sharing service. No account required—u
## Start with one command
```bash
docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.3 # x-release-please-version
docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.4 # x-release-please-version
```
Open `http://localhost:12345` and complete first-run setup. Pin a version in production; `latest` tracks the newest stable release.
+5 -5
View File
@@ -90,13 +90,13 @@ class LoginRateLimitTests(SettingsOverrideMixin, unittest.TestCase):
self.assertTrue(ip_limit["login"].check_ip("198.51.100.8"))
class DockerNonRootTests(unittest.TestCase):
def test_dockerfile_runs_as_non_root_user(self):
class DockerRuntimeUserTests(unittest.TestCase):
def test_dockerfile_defaults_to_root_for_volume_compatibility(self):
# 默认 root:兼容已有 data 卷权限;如需非 root 可由编排层自行指定 user
text = Path("Dockerfile").read_text()
self.assertIn("USER appuser", text)
self.assertIn("--uid 1000", text)
self.assertNotIn("USER appuser", text)
compose = Path("docker-compose.yml").read_text()
self.assertIn('user: "1000:1000"', compose)
self.assertNotIn('user: "1000:1000"', compose)
if __name__ == "__main__":