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

[Bug] Docker Compose Installation issues on macOS #4602

Open
mrshu opened this issue Nov 4, 2024 · 2 comments
Open

[Bug] Docker Compose Installation issues on macOS #4602

mrshu opened this issue Nov 4, 2024 · 2 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@mrshu
Copy link

mrshu commented Nov 4, 2024

📦 Environment

Docker, Other

📌 Version

v1.26.20

💻 Operating System

macOS

🌐 Browser

Chrome

🐛 Bug Description

When going through Docker Compose tutorial, I ran into this:

Error response from daemon: unable to find user nextjs: no matching entries in passwd file

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@mrshu mrshu added the 🐛 Bug Something isn't working | 缺陷 label Nov 4, 2024
@lobehubbot
Copy link
Member

👀 @mrshu

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@mrshu mrshu changed the title [Bug] [Bug] Docker Compose Installation issues on macOS Nov 4, 2024
Copy link

dosubot bot commented Nov 4, 2024

Hey @mrshu! 👋 I'm here to help you with any bugs, questions, or contributions you have while waiting for a human maintainer. Let's squash those bugs together!

The error "unable to find user nextjs: no matching entries in passwd file" suggests that the 'nextjs' user is not being created or recognized in the Docker environment. This user is supposed to be created in the Dockerfile for Lobe Chat to run the application with a non-root user for security reasons.

To troubleshoot this issue, ensure that the Dockerfile includes the necessary steps to create the 'nextjs' user. The relevant section should look like this:

RUN \
    # Add nextjs:nodejs to run the app
    addgroup -S -g 1001 nodejs \
    && adduser -D -G nodejs -H -S -h /app -u 1001 nextjs \
    # Set permission for nextjs:nodejs
    && chown -R nextjs:nodejs /app /etc/proxychains4.conf

Additionally, verify that the Docker Compose file includes the instruction USER nextjs to specify that the container should run as the 'nextjs' user [1].

If these steps are already in place, try rebuilding the Docker image to ensure that all changes are applied correctly.

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants