Skip to content

Is it possible to not hardcode HOME in Dockerfile? #1307

@yarikoptic

Description

@yarikoptic

ATM https://github.com/nipreps/mriqc/blob/master/Dockerfile#L164

ENV HOME="/home/mriqc"

which then gets inherited also within singularity container we convert docker container into in https://github.com/ReproNim/containers so it is "hardcoded" even if I would run in singularity with current user, and thus having no /home/mriqc. As a result we get

>      File "/opt/conda/lib/python3.11/pathlib.py", line 1116, in mkdir
>        os.mkdir(self, mode)
>    OSError: [Errno 30] Read-only file system: '/home/mriqc/.cache'

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