C # – Can I use NHibernate with docker?

I have a main project ASP.NET MVC staff that supports Docker. I would like to use NHibernate to persist and retrieve information. In my research, I did not find anyone to use. I am trying but the following error occurs:

Internal exception:

SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server.
The server was not found or was not accessible.
Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error locating the specified server / instance)

I call the method that updates or builds the database tables in the program.cs class

                public static void Main (string[] args)
{
// Call the method that generates or updates the tables in the database
NHibernateHelper.GerateOrUseTables ();
// Start the web host
CreateWebHostBuilder (args) .Build (). Run ();
}

The NHibernateHelper class:

public class NHibernateHelper
{
Private static ISessionFactory = CriaSessionFactory ();

static private ISessionFactory CriaSessionFactory ()
{
Configuration cfg = RestoreConfiguration ();
return cfg.BuildSessionFactory ();
}

static public Configuration recovers configuration ()
{
Configuration cfg = new configuration ();
cfg.Configure ();
cfg.AddAssembly (Assembly.GetExecutingAssembly ());
return cfg;
}

public static static GenerateOutTable ()
{
Configuration config = RestoreConfiguration ();
new SchemaExport (config) .Create (true, true);
}

public static ISession AbreSession ()
{

returns fabrica.OpenSession ();
}
}

When going to run with "IIS Express", it works normally. I've tried setting up docker with the help of a few pages to allow remote connections, but my attempt failed.