I am trying to develop new data plugin to be imported during my algo execution. Before deploying my service I want to test it locally. Is it possible to access localhost from docker container. 

internal class EarningsDateDataType : BaseDataCollection
{
    public DateTime EarningsReleaseDateTime { get; set; }
    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLive)
    {
        return new SubscriptionDataSource($"https://localhost:7165/EarningsDate?ticker={config.Symbol}", SubscriptionTransportMedium.RemoteFile, FileFormat.Csv);
    }
    public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
    {
        var l = line.Replace(Environment.NewLine, string.Empty);
        var s = DateTime.Parse(l);
        return new EarningsDateDataType()
        {
            EarningsReleaseDateTime = s,
            Symbol = config.Symbol
        };
    }
    
    public override Resolution DefaultResolution()
    {
        return Resolution.Daily;
    }
}