Release with distillery and sname not able to remote connect

OK follow up. I’m running my release in a docker container and specified the name like this:

-name <%= release_name %>@${HOSTNAME}

I started the app with REPLACE_OS_VARS=true and verified that the name was set correctly:

# vm.args
-name myapp@66277af8dc0e

But now when I connect from a different docker container (same network, same subnet) via:

iex --name debug --cookie 'secretcookie' --remsh myapp@66277af8dc0e

I get the error:

2017-08-19 18:57:25 Can't set long node name!
Please check your configuration

The same happens if I set the name via -sname:

#vm.args
-sname <%= release_name %>