Skip to content

is it possible to change uid of yoctouser? #105

@mfide

Description

@mfide

I use following docker-compose.yml and it works fine on my debian12 system because by chance /home/mf/development folder in the host system owned by user mf and mf has UID:1000 which matches with yoctouser's UID in the container, therefore it has read/write access to the folder /home/yoctouser/development inside container.

services:
  yocto_builder:
    image: crops/yocto:ubuntu-22.04-base
    user: yoctouser
    container_name: yocto-builder
    hostname: yocto-builder
    command: ["sleep","infinity"]
    volumes:
      - /home/mf/development:/home/yoctouser/development
      - /home/mf/.ssh:/home/yoctouser/.ssh

But I have another system and my user name mfid with UID:1007 there. In this case, with the same docker compose file, I get Permission denied error inside container's development folder if I attempt to create a new file because yoctouser created in the container has UID:1000 which doesnt match with mfid's.

What is the suggested way to solve this problem?

Thank you.

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