Skip to content

Random user ID in Docker image makes bind mount difficult #40

@zhen-huan-hu

Description

@zhen-huan-hu

It seems the Dockerfile creates a user itself

RUN groupadd -r -f librum-server
RUN useradd -r -g librum-server -d /var/lib/librum-server --shell /usr/sbin/nologin librum-server

This is really unnecessary and unorthodox. The randomly assigned user ID inside the image had nothing to do with user IDs on the host so it makes using bind mount for the storage directory difficult.

A better approach would be just leaving it to the users to assign a user and group ID at runtime.

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

    Issue actions