Be sure to update the container and also nextcloud. I just tested it here and had no problems adding 2 shares using smb/cifs. I had to update Nextcloud though, as I was still on 17.0.1 and smb/cifs refused to work on that version.
You do not have to fill out the field above domain (Ekstern undermappe på norsk). This might be your issue as it tries to use a folder under yourserver\share\ which fails. I think that you mistook this as the place to mount the smb/cifs share inside the container, which is not the case.
Why are you trying to run docker exec -it name nextcloud config?