Skip to content

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

Closed
Closed
@redjumper

Description

@redjumper
Contributor

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

Activity

88250

88250 commented on Sep 30, 2024

@88250
Member

欢迎 PR 帮助改进。

wanghan0501

wanghan0501 commented on Sep 30, 2024

@wanghan0501

me too

Mowen-M

Mowen-M commented on Sep 30, 2024

@Mowen-M

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

redjumper

redjumper commented on Sep 30, 2024

@redjumper
ContributorAuthor

欢迎 PR 帮助改进。

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

88250

88250 commented on Sep 30, 2024

@88250
Member

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

image

Macavity

Macavity commented on Sep 30, 2024

@Macavity
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

redjumper commented on Sep 30, 2024

@redjumper
ContributorAuthor
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

redjumper commented on Sep 30, 2024

@redjumper
ContributorAuthor

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

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

added a commit that references this issue on Sep 30, 2024
88250

88250 commented on Sep 30, 2024

@88250
Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Macavity@88250@wanghan0501@redjumper@Mowen-M

        Issue actions

          [v.3.1.8] 容器无法启动 · Issue #12657 · siyuan-note/siyuan