Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v.3.1.8] 容器无法启动 #12657

Closed
2 of 3 tasks
redjumper opened this issue Sep 30, 2024 · 9 comments
Closed
2 of 3 tasks

[v.3.1.8] 容器无法启动 #12657

redjumper opened this issue Sep 30, 2024 · 9 comments

Comments

@redjumper
Copy link
Contributor

redjumper commented Sep 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

镜像更新到3.1.8后,无法启动
#12596 有关,容器中已存在siyuan用户
docker logs如下

Using existing group: siyuan (1000)
Creating user siyuan (PUID: 1080, PGID: 1000)
adduser: user 'siyuan' in use

cat /etc/passwd
siyuan:x:1000:1000:Linux User,,,:/home/siyuan:/bin/sh)

Expected result

容器中已存在siyuan用户时,不再添加siyuan用户

Screenshot or screen recording presentation

No response

Version environment

- Version: 3.1.8

Log file

docker logs如下

Using existing group: siyuan (1000)
Creating user siyuan (PUID: 1080, PGID: 1000)
adduser: user 'siyuan' in use

More information

No response

@88250
Copy link
Member

88250 commented Sep 30, 2024

欢迎 PR 帮助改进。

@wanghan0501
Copy link

me too

@Mowen-M
Copy link

Mowen-M commented Sep 30, 2024

同样无法启动,PUID和PGID默认1000也不行,可能是冲突了

@redjumper
Copy link
Contributor Author

欢迎 PR 帮助改进。

已提交pr #12658
不太清楚以前的逻辑,我看v3.1.7版本的容器是以root用户运行的。pr #12596 ,如果不指定UID与PID,强制了以1000:1000运行,这是在预期内?

@88250
Copy link
Member

88250 commented Sep 30, 2024

以前的版本是用 siyuan 用户运行的:

image

@Macavity
Copy link
Contributor

It's a bit confusing how exactly this happened, with a new image the container should start fresh 🤔
Can you share your compose file or how you start the container?

@redjumper
Copy link
Contributor Author

services:
  siyuan:
    image: b3log/siyuan:latest
    container_name: siyuan
    ports:
      - "6806:6806"
    command:
      "--lang=zh_CN --ssl=true --workspace=/siyuan/workspace/ --accessAuthCode='1234567890'"
    user: 0:0
    restart: unless-stopped
    volumes:
      - siyuan-data:/siyuan/workspace

volumes:
  siyuan-data:

I forgot why i add user: 0:0, maybe volume permissions.

@redjumper
Copy link
Contributor Author

以前的版本是用 siyuan 用户运行的:

以前的版本如果不指定--workspace,是否能运行,有没有默认值

88250 pushed a commit that referenced this issue Sep 30, 2024
* fix issue #12657

* fix issue #12657
@88250
Copy link
Member

88250 commented Sep 30, 2024

#12658

@88250 88250 closed this as completed Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants