1. You don't. Mines only have a hangar bay, i.e. only vehicles can dock with it.
2. You don't have to dock with the mine to load materials from the mine to your ship or vice versa. Head into the control room/cockpit of the entity where the materials are currently stored, then unload them from the appropriate screen into the new entity (e.g. your ship).
Just make sure that the ship you are unloading into is either above the facility (ie on top of the facility image) or on one of the squares directly adjacent to the facility.