Setting up Elixir with Dockerized PostgreSQL

Actually it works for local instance of postgres but not for postgres container in docker.
I set password provided during setting up contaner, as a host (according to docs) i set up container name.

I get errors about non-existing domain.

With local Postgres everything works
With Postgres in docker I cant create database using mix ecto.create.