A man has been jailed for more than five years after several firearms were found in storage containers in Dorset.