There's no point in attacking a transport that is very close to a station anyway. If you were not able to take the transport down before he is able to dock, then the problem lies within your firepower and strategy.
As jammi said, a transport docking is a clear win for the transport. Transports and freighters should not be punished for not fighting with a bomber, or something with similar or higher firepower against transports, but instead successfully escaping the grasp of death.