I faced the same issue and I didn't want to change the default port of MSSQL (1433)
Here what I did to fix this problem.
Make sure that your port is not in used, Go to resource monitor to validate this.
Now check if the port is reserved. Open your command prompt and enter this
netsh int ipv4 show excludedportrange protocol=tcp
The port listed here are managed by hyper-v and the only way to remove the port 1433 here is to disable hyper-v, reserve the port 1433 so hyper-v doesn't reserve it back.
Disable hyper-v
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
Reserve the port 1433
netsh int ipv4 add excludedportrange protocol=tcp startport=1433 numberofports=1
Re Enable hyper-v
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
Start docker and run your container
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…