Docker Community Forums

Share and learn in the Docker community.

Create organizations with "special" character [SOLVED]

Hi,

We are trying to create organizations with a dash (-) in the name in DTR 2.1.1 . The error message is "Must start with an alphanumeric character and consist of letters, numbers, and '.-$’ only"_. Using a dot works sometimes if no other faulty character has been used.

Image of the error in 2.1.2.

None of those characters actually works.

Somewhat confused… Any solution?

/Ove

Hi,

We are exactly facing the same issue. We used to have organizations and teams with one or multiple ‘-’ and we can’t migrate smoothly to DTR 2.1 because the use of such character raises an error.
Att this time, we found no solution but remove the ‘-’.

Kar1

1 Like

Got this reply from the Docker Support.

The workaround to do this is to do the following. Open the “network” tab in chrome’s developer tools. Create an organization without a hyphen in it, and find that request in that network panel. Right click on the request and choose “copy as curl”. Paste that into a text document and change the org name to the valid name with the dashes. You can run the resulting curl command and get an org created.

The two cURL commands to run looks something like this:

curl --user <name>:<password> 'https://<DTR_URL>/enzi/v0/accounts' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary $'{"name":"my-hyphen-org","user":{"name":"admin","id":"<LOOKUP_THE_ADMIN_ID","fullName":"<Admin Fullname>","isOrg":false,"isAdmin":true,"isActive":true},"isOrg":true}' --compressed

curl --user <name>:<password> 'https://<DTR_URL>/enzi/v0/accounts/dummyorg/members/admin' -X PUT -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"isAdmin":true,"isPublic":true}' --compressed

I use Postman since I don’t have to mess around with the ca-certificates then but it is easy to import the cURL commands in Postman.

Unfortunately there’s a glitch in the UI which prohibits you from doing this, but you should be able to do it through the API. I’ll see if we can get something out to fix this ASAP.

This problem is now solved in the DTR. :smiley:

1 Like