Adding authentication variable to container


vonfrank

Recommended Posts

Hi there

 

I am creating a docker manually in the wizard on my unraid system. I use a docker hub repository, in my case the original docker container for mongodb. I want to add the authentication variable ( --auth) to my run command, but i can't figure out where to put it. The original string for running the command is "$ docker run --name some-mongo -d mongo --auth"

 

I have managed to make it work, by putting the --auth variable behind the repository field, but i have to delete it every time i update my container, and my icon doesn't work. Isn't there a more "right" way to add this variable?

 

This is my custom template so far. Thanks!

Capture.PNG.27ef8b5a6b85158a9ea03c6828281377.PNG

Link to comment

Put it in the extra parameters box and see if that boxes.

 

Sent from my C6903 using Tapatalk

 

Hmm.. I tried this, and got a little further.. I tried " --auth" and "-d mongo --auth". The last one made it able to complete, but not start. But i saw a pattern. If i put it behind the repository field, (here it works, but can't update, and other small errors), the --auth comes behind the mongo command. If i put them in the extra parameters field, it goes in front of the mongo command.

 

I need the --auth to be the last part of the command. Any ideas?

Capture.PNG.77ac7b98481af40b905351ba97f04204.PNG

Capture2.PNG.eae3859cbc4190a315f03515b446afc3.PNG

Link to comment

Put it in the extra parameters box and see if that boxes.

 

Sent from my C6903 using Tapatalk

 

Hmm.. I tried this, and got a little further.. I tried " --auth" and "-d mongo --auth". The last one made it able to complete, but not start. But i saw a pattern. If i put it behind the repository field, (here it works, but can't update, and other small errors), the --auth comes behind the mongo command. If i put them in the extra parameters field, it goes in front of the mongo command.

 

I need the --auth to be the last part of the command. Any ideas?

 

Just playing around with this out of curiosity, looking at the readme there's nothing about --auth, where are you getting that from?

Link to comment

Put it in the extra parameters box and see if that boxes.

 

Sent from my C6903 using Tapatalk

 

Hmm.. I tried this, and got a little further.. I tried " --auth" and "-d mongo --auth". The last one made it able to complete, but not start. But i saw a pattern. If i put it behind the repository field, (here it works, but can't update, and other small errors), the --auth comes behind the mongo command. If i put them in the extra parameters field, it goes in front of the mongo command.

 

I need the --auth to be the last part of the command. Any ideas?

 

Just playing around with this out of curiosity, looking at the readme there's nothing about --auth, where are you getting that from?

 

Im not an expert, but from the docker hub page.. Around 40% down.. https://hub.docker.com/_/mongo/ there is a section of authentication.

Link to comment

whenever i try to update.. it tries to update from mongo --auth:latest and not mongo:latest.....

 

Everything you add in the template ends up in the run command.

 

Every time you want to update the container you will need to remove --auth.

 

Okay, thank you! Do you know if there is another workaround?

Link to comment

whenever i try to update.. it tries to update from mongo --auth:latest and not mongo:latest.....

 

Everything you add in the template ends up in the run command.

 

Every time you want to update the container you will need to remove --auth.

 

That is the workaround....

 

Okay, thank you! Do you know if there is another workaround?

Link to comment
  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.