Skip to content

Commit

Permalink
docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org committed Jun 18, 2024
1 parent 9df4fc2 commit 2c0ac17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
docker pull trueaiorg/mdrive
docker run --name mdrive -d --restart=always \
-e BASIC_AUTH_USER=admin -e BASIC_AUTH_PASSWORD=123456 \
-p 8080:8080 trueaiorg/mdrive
-p 8080:8080 --user root trueaiorg/mdrive

# or ghcr.io
docker pull ghcr.io/trueai-org/mdrive
docker run --name mdrive -d --restart=always \
-e BASIC_AUTH_USER=admin -e BASIC_AUTH_PASSWORD=123456 \
-p 8080:8080 ghcr.io/trueai-org/mdrive
-p 8080:8080 --user root ghcr.io/trueai-org/mdrive
```

> windows 版本
Expand Down Expand Up @@ -83,7 +83,7 @@ docker run --name mdrive -d --restart=always \
-v /home/mdrive/db:/app/db:rw \
-e BASIC_AUTH_USER=admin -e BASIC_AUTH_PASSWORD=123456 \
-e READ_ONLY=true \
-p 18080:8080 trueaiorg/mdrive
-p 18080:8080 --user root trueaiorg/mdrive
# 确保目录存在
# 确保映射/挂载了备份目录
Expand All @@ -102,7 +102,7 @@ docker run --name mdrive -d --restart=always \
-v /home/mdrive/appsettings.json:/app/appsettings.json:rw \
-v /data:/data:ro \
-e BASIC_AUTH_USER=admin -e BASIC_AUTH_PASSWORD=123456 \
-p 8080:8080 trueaiorg/mdrive
-p 8080:8080 --user root trueaiorg/mdrive
# 调试日志
docker logs mdrive
Expand All @@ -122,7 +122,7 @@ docker run --name mdrive -d --restart=always \
-v /home/mdrive/db:/app/db \
-v /data:/data:ro \
-e BASIC_AUTH_USER=admin -e BASIC_AUTH_PASSWORD=123456 \
-p 8080:8080 trueaiorg/mdrive
-p 8080:8080 --user root trueaiorg/mdrive
# 更多权限,容器内以 root 用户启动:--user root
Expand Down
1 change: 0 additions & 1 deletion src/MDriveSync.Client.API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./MDriveSync.Client.API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM base AS final
USER root # È·±£ÒÔ root Óû§ÔËÐÐ
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MDriveSync.Client.API.dll"]

0 comments on commit 2c0ac17

Please sign in to comment.