docker bugfixes surrounding parsing a comma-separated string to a list

1) A single number param (3333 being passed to 'ports', for example) will cause the module to error - this PR explicitly casts the value to string before splitting if it's not a list already.
2) In #6327, someone had an issue involving spaces between commas causing issues. This calls `strip()` on each list param to keep that from happening in the future.