booksonic-air docker container Connection reset by peer

I’ve just installed booksonic-air through docker compose and when running curl http://127.0.0.1:4040 i get Connection reset by peer error.

Docker container looks like listening to 0.0.0.0 address so I should be able to access from the host OS.

Does anyone know how could I solve it?

This is the docker compose yml config file:

# docker/docker-compose/booksonic-air.yml
---
version: "2.1"
services:
  booksonic-air:
    image: lscr.io/linuxserver/booksonic-air
    container_name: booksonic-air
    environment:
      - PUID=123
      - PGID=130
      - TZ=America/Toronto
      - CONTEXT_PATH=https://booksonic.example.com
    volumes:
      - /etc/docker/booksonic/:/config
      - /home/nginx/Tools/nextcloud_data/myuser/files/Media/Audio/Audible/Audiobook/:/audiobooks
#      - </path/to/podcasts>:/podcasts
      - /home/nginx/Tools/nextcloud_data/myuser/files/Media/Music/:/music
#      - </path/to/othermedia>:/othermedia
    ports:
      - 4040:4040
    restart: unless-stopped

PUID and GUID belong to nginx user as audio files are the ones stored at Nextcloud.

I composed the docker container through docker compose -f /root/docker/docker-compose/booksonic-air.yml up -d

Now when I run curl -I http://127.0.0.1:4040 I get:

curl -I http://127.0.0.1:4040
curl: (56) Recv failure: Connection reset by peer

Container ls

# docker container ls
CONTAINER ID   IMAGE                               COMMAND   CREATED          STATUS          PORTS                                       NAMES
75189ef3c2b7   lscr.io/linuxserver/booksonic-air   "/init"   48 minutes ago   Up 48 minutes   0.0.0.0:4040->4040/tcp, :::4040->4040/tcp   booksonic-air

# docker --version
Docker version 20.10.14, build a224086

OS info:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:    20.04
Codename:   focal

# uname -a
Linux host.example.com 5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:04:27 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux