Obedience to the rules and regulations of the dock board may be enforced in the name of the county or municipality, as the case may be, by a fine not exceeding one hundred dollars or by imprisonment not exceeding thirty days; Provided, the county board shall first adopt the same by regulation or governing body of such municipality shall first adopt the same in ordinance form, as ordinances of the municipality.