Cannot access to dockerized mssql server

I’m trying to dockerize two .net core 3.1 service (my-api and my-db).
my-db service is using mssql database and I’m using scripts below to create actual db insi de container as soon as it get up

docker-compose up --build

services are up and running but when I use api service to access db I’m getting
An error occurred using the connection to database ‘mydatabase’ on server ‘my-db’.

docker-compose.yml

version: '3.0' 
services:
  my-db:
    build: ./Data/Docker
  my-api:
    ports: 
      - "8080:5000"         
    depends_on: 
      - my-db
   ... ommited for clarity

Data/Docker

FROM mcr.microsoft.com/mssql/server:2017-CU17-ubuntu
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app    
COPY . /usr/src/app    
RUN chmod +x /usr/src/app/run-initialization.sh    
ENV SA_PASSWORD pass
ENV ACCEPT_EULA Y
ENV MSSQL_PID Express    
EXPOSE 1433    
CMD /bin/bash ./entrypoint.sh

entrypoint.sh

/usr/src/app/run-initialization.sh & /opt/mssql/bin/sqlservr

run-initialization.sh

/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P pass -d master -i create-database.sql

create-database.sql

CREATE DATABASE [mydatabase] 
GO
USE [mydatabase]
GO

Source: Docker Questions