Skip to content

Allow rebuilding image with uid and/or gid higher than 256000 #158

@stejes

Description

@stejes

The wodby docs state that if you need the wodby user to have a different uid and gid than 1000 (for permission purposes across host/container), that you should rebuild the image with the WODBY_USER_ID and WODBY_GROUP_ID build args. However, this did not work for me since adduser and addgroup don't accept values higher than 256000. I cannot locally change these values on my machine because it is managed by my work.

I created a pull request that solves the issue for me: #157, by installing and using the useradd and groupadd commands instead. Maybe there are better solutions possible. Any feedback welcome. There is a similar pull request #112, but that didn't seem quite right.

Fyi, I use docker-compose to rebuild with the ids as such:

php:
    build:
      context: https://github.com/stejes/wodby-php.git#fix-uid-issue:8
      args:
        WODBY_USER_ID: 664924666
        WODBY_GROUP_ID: 664200777
        PHP_VER: 8.0
        PHP_DEV: -dev
...


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