Skip to content

uid 1337 is hardcoded for sail user in Dockerfile #811

@misog

Description

@misog

Sail Version

1.44.0

Laravel Version

12.24.0

PHP Version

8.4.11

Operating System

Linux

OS Version

5.10

Description

uid 1337 is hardcoded for sail user in Dockerfiles:

RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail

So $WWWGROUP can be specified but $WWWUSER can not be specified. This is problematic with some configuations of userns_mode.

It gives error when trying to apply the patch in start-container:

if [ ! -z "$WWWUSER" ]; then
    usermod -u $WWWUSER sail
fi

usermod: UID '1000' already exists

Which lefts sail user with uid 1337 and not 1000

Steps To Reproduce

  1. Write WWWUSER: 1000 inside docker-compose.override.yml
  2. sail build --no-cache
  3. usermod -u $WWWUSER sail patch fails in start-container
  4. Created user sail has uid 1337

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