I've tried for about 3 days to get past this. I tried my Dockerfile and the solution's Dockerfile. The container builds, I ran the script to get the nexus files, and when I run the run-persistent.sh the container exist immediately.
Running podman logs only shows this:
nexus-start.sh: line 8: cd: /opt/nexus/nexus2: No such file or directory
Error: Could not find or load main class org.sonatype.nexus.bootstrap.Launcher
Any ideas? I reviewed the persistence section and everything seems right.
I had to change the curl in get-nexus-bundle to follow redirects. It was downloading the tar as an html file, and that broke the next steps. Maybe I screwed something up, not sure.
I am facing the same issue and tried with solutions as well, no luck.
Stuck at the same step.
Any help would be appreciated.
I just tried to replicate the issue but it worked fine on my side.
What versions of the course are you using? Can you provide the output of the `curl` command?
Like I described, the video instructs to get that nexus tarball, but if I recall, the url was correct, but there was a redirect on the server side to a CDN or something so the curl failed. I didn't throw an error until later in the process.
OP: Make sure that you have the right nexus files and that they extract and install, as expected. As soon as I could get a tarball from curl, I think that fixed it.
TL;DR: I think I just had to add -L to my curl.
I can't run the curl as the pod is getting exited after running ./run-persistent.sh.
I tried running ./run-persistent.sh after re-building the nexus images. Will that be a problem ?
Snippet of the steps performed.
I should have been more explicit. You are right, I meant the `curl` command inside the `get_nexus_bundle.sh` script. I should be something like:
> curl -L --progress-bar -O https://download.sonatype.com/nexus/oss/nexus-2.14.3-02-bundle.tar.gz
Note the "-L" parameter, indicating the curl command to follow redirects.
It really sounds like the script is silently failing, and the tarball is not being downloaded (IIRC, a HTML page is downloaded instead). This does not block creating the container image, but causes the later run issue.
P.S. Building the image using the --no-cache parameter is not necessary. If local files are changed, the layer including those files will also change, hence the cache will not hit.