This article presents an automatic docking method suitable for fully actuated surface vessels for the purposes of assisting operators of maritime vessels when docking in time-varying environmental conditions. Docking of ships is a particularly stressful task for human operators, with high demands for both speed and precision, especially under influence from environmental disturbances such as wind, waves and ocean currents. The need for automatic docking systems is increasing as unmanned maritime vessels become more advanced and integrated into global maritime transportation. To address this task, a comprehensive automatic docking algorithm was developed, with path following and velocity control using a modified dynamic positioning control system, which makes the method applicable in existing industrial control systems. In addition, the method includes capability analysis of the docking procedure and evaluates strategies for counteracting disturbances. Specifically, this method utilizes a modified dynamic positioning control system using position sensor data only, to control position, heading and velocity in different stages when docking automatically. The methods are proven in simulations and field experiments.