Error during Docker instance generation

I’m trying to generate a docker instance as per docs:

./docker-resources/manage.sh mix deps.get

However it seems Hex is missing?

Could not find Hex, which is needed to build dependency :phoenix
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] y
** (File.Error) could not make directory (with -p) "/opt/akkoma/.mix/archives/hex-2.0.6": no such file or directory
    (elixir 1.13.4) lib/file.ex:316: File.mkdir_p!/1
    (mix 1.13.4) lib/mix/tasks/archive.install.ex:118: Mix.Tasks.Archive.Install.install/3
    (mix 1.13.4) lib/mix/local/installer.ex:107: Mix.Local.Installer.local_install/3
    (mix 1.13.4) lib/mix/dep/loader.ex:202: Mix.Dep.Loader.with_scm_and_app/4
    (mix 1.13.4) lib/mix/dep/loader.ex:156: Mix.Dep.Loader.to_dep/3
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.13.4) lib/mix/dep/loader.ex:373: Mix.Dep.Loader.mix_children/2
    (mix 1.13.4) lib/mix/dep/loader.ex:18: Mix.Dep.Loader.children/0
ERROR: 1

Are you with a rootless container?

if you run ./docker-resources/manage.sh ls -lah you might find that the home dir is owned by root.

you might want to use both --privileged and --userns=host, or just use the host docker instead of user owned.

Do I use those parameters when creating the container or when running mix deps.get?

after some research there’s a better way to address this:
when using rootless container:

  1. check your /etc/subuid, take the starting uid as base (the second segment, i.e: user1:100000:65536, it’s 100000)
  2. assuming the userid is 1000 inside the container, add 1000 to your base uid and minus one, ie: echo $(( 100000 + 1000 - 1)) = 100999
  3. sudo chown -R 100999:100999 .

ps. I don’t really like how akkoma’s Dockerfile is organized and the idea of mixing a git repo with container mounts.