-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs for printing the generated admin.password #116
base: main
Are you sure you want to change the base?
Conversation
README.md
Outdated
> A simple way to print the password is the follwoing: | ||
> - After the nexus3 contaier is finished running, run `docker ps --filter "ancestor=sonatype/nexus3"` | ||
> it will print a list of containers, find your container and copy the `CONTAINER ID` | ||
> - Run `docker container exec -it <CONTAINER ID> cat /nexus-data/admin.password && echo` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason that the previous command is not combined with this one? I don't have a test environment handy, but I'm imagining something like:
docker container exec -it $(docker ps --filter "ancestor=sonatype/nexus3" | awk '{print $1}') cat /nexus-data/admin.password && echo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wwannemacher The main reason is if a user is running multiple containers based on the same image. But I do not mind combining the commands :)
The goal is for users to get this generated password easily.
What would be perfect: Allow users to supply a param with the docker run
command like: docker run <> -e SHOW_ADMIN_PASSWORD=true
(naming things is hard), and the container would print the admin password in the logs. Is that something I can contribute and you think would be beneficial ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wwannemacher Seems reasonable. Unlikely that folks have more than one running I would assume. Though note the default output has the column headers so I suggest to use -q
to just get the container id. Another suggestion is to just use the container name.
docker container exec -it $(docker ps -q --filter "name=nexus3") cat /nexus-data/admin.password && echo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahmed-musallam - this is something that should happen at the operational level, not the application level. What you have here is good. Thanks for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahmed-musallam FWIW, I'm totally stealing your approach for printing the generated admin password and adding it to the NXRM format archetype docs. Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@collinpeters and @wwannemacher updated to use the suggested command, changed name to "nexus" though; because that's the name you use at the top of this doc.
README.md
Outdated
> A simple way to print the password is the follwoing: | ||
> - After the nexus3 contaier is finished running, run `docker ps --filter "ancestor=sonatype/nexus3"` | ||
> it will print a list of containers, find your container and copy the `CONTAINER ID` | ||
> - Run `docker container exec -it <CONTAINER ID> cat /nexus-data/admin.password && echo` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wwannemacher Seems reasonable. Unlikely that folks have more than one running I would assume. Though note the default output has the column headers so I suggest to use -q
to just get the container id. Another suggestion is to just use the container name.
docker container exec -it $(docker ps -q --filter "name=nexus3") cat /nexus-data/admin.password && echo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 thanks
Add simple documentation for printing the generted admin.password
This pull request makes the following changes: