Skip to content

Home cannot be used as project folder #401

@kuisathaverat

Description

@kuisathaverat

I recently used Hermit in a Docker container to make it easy to install the tools I need for that container. I use a python:3.11 Docker container as a base, and I need to install some cloud tools. I found (in the hard way) that you can not use the user's HOME as a project directory; there is some issue with the hermit command.

If you execute the following command you can replicate the issue:

docker run -it --rm --entrypoint=/bin/bash python:3.11

curl -fsSL https://github.com/cashapp/hermit/releases/download/stable/install.sh | /bin/bash
export PATH=$HOME/bin:$PATH
hermit init $HOME
. /root/bin/activate-hermit

You will hit the following error

fatal:hermit: binary is not a Hermit symlink: /root/bin/hermit

Solution, do not use HOME for init hermit:

docker run -it --rm --entrypoint=/bin/bash python:3.11

curl -fsSL https://github.com/cashapp/hermit/releases/download/stable/install.sh | /bin/bash
export PATH=$HOME/bin:$PATH

TOOLS_DIR=$HOME/tools
PATH=$TOOLS_DIR/bin:$PATH
mkdir -p $TOOLS_DIR
hermit init $TOOLS_DIR
. $TOOLS_DIR/bin/activate-hermit

I just opened an issue to make a record of it for people who hit the same issue. Feel free to close it if it is not relevant.

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