From bac65b55e68f234aad1bfd464c43ba734b937522 Mon Sep 17 00:00:00 2001 From: Ahmed Musallam Date: Tue, 17 Mar 2020 13:57:32 -0500 Subject: [PATCH 1/3] Add docs for printing the generated admin.password --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a968b146..71aef454 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,13 @@ In addition to the Universal Base Image, we can build images based on: * Our [system requirements](https://help.sonatype.com/display/NXRM3/System+Requirements) should be taken into account when provisioning the Docker container. * Default user is `admin` and the uniquely generated password can be found in the `admin.password` file inside the volume. See [Persistent Data](#user-content-persistent-data) for information about the volume. + + > 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 cat /nexus-data/admin.password && echo` + > + > if my `CONTAINER ID` was `1951dfd68025`, I'd run `docker container exec -it 1951dfd68025 cat /nexus-data/admin.password && echo` * It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready: From 4934ca3ca8811e78750efe395b733d0f60646930 Mon Sep 17 00:00:00 2001 From: Ahmed Musallam Date: Wed, 18 Mar 2020 16:24:46 -0500 Subject: [PATCH 2/3] update to simpler command --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 71aef454..7b7354e8 100644 --- a/README.md +++ b/README.md @@ -101,12 +101,13 @@ In addition to the Universal Base Image, we can build images based on: * Our [system requirements](https://help.sonatype.com/display/NXRM3/System+Requirements) should be taken into account when provisioning the Docker container. * Default user is `admin` and the uniquely generated password can be found in the `admin.password` file inside the volume. See [Persistent Data](#user-content-persistent-data) for information about the volume. - > 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 cat /nexus-data/admin.password && echo` - > - > if my `CONTAINER ID` was `1951dfd68025`, I'd run `docker container exec -it 1951dfd68025 cat /nexus-data/admin.password && echo` + > You could print the generated admin password by running the following command after the container is finished running: + > + > ```sh + docker container exec -it $(docker ps -q --filter "name=nexus") cat /nexus-data/admin.password && echo + ``` + > Above command assumes you are running one container. + * It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready: From 058e62f2e95e6aa1e3c14d7ddc96ab9c3b713ce2 Mon Sep 17 00:00:00 2001 From: Ahmed Musallam Date: Tue, 24 Mar 2020 16:10:16 -0500 Subject: [PATCH 3/3] update markdown and fix typo --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b7354e8..405a5409 100644 --- a/README.md +++ b/README.md @@ -101,11 +101,11 @@ In addition to the Universal Base Image, we can build images based on: * Our [system requirements](https://help.sonatype.com/display/NXRM3/System+Requirements) should be taken into account when provisioning the Docker container. * Default user is `admin` and the uniquely generated password can be found in the `admin.password` file inside the volume. See [Persistent Data](#user-content-persistent-data) for information about the volume. - > You could print the generated admin password by running the following command after the container is finished running: + > You can print the generated admin password by running the following command after the container is finished running: > > ```sh - docker container exec -it $(docker ps -q --filter "name=nexus") cat /nexus-data/admin.password && echo - ``` + > docker container exec -it $(docker ps -q --filter "name=nexus") cat /nexus-data/admin.password && echo + > ``` > Above command assumes you are running one container.