We are having trouble getting the External Feed from a Sonatype Nexus Docker repository to work.
We are on Octopus 2019.13.7 and running Nexus OSS 3.23.0-03. We use Nginx as a proxy in front of Nexus.
When I use docker commands from the server where I have my tentacle installed I can use docker login, docker pull, docker push. Here are some examples of that:
$ docker login https://dev-nexus.krg.no -u docker -p xxxxxxx
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/bjek/.docker/config.json.
Configure a credential helper to remove this warning. See
$ docker tag alpine:3.4 dev-nexus.krg.no/alpine:latest
bjek@dev-bjek-001:~$ docker push dev-nexus.krg.no/alpine:latest
The push refers to repository [dev-nexus.krg.no/alpine]
latest: digest: sha256:0325f4ff0aa8c89a27d1dbe10b29a71a8d4c1a42719a4170e0552a312e22fe88 size: 528
$ docker pull dev-nexus.krg.no/personws:104
104: Pulling from personws
5667fdb72017: Already exists
d83811f270d5: Already exists
ee671aafb583: Already exists
7fc152dfb3a6: Already exists
a793585924eb: Already exists
0afa1a0ba474: Already exists
a912a5fc24d6: Already exists
5b89d03f09cc: Pull complete
a0e7321e788d: Pull complete
ad073cf36965: Pull complete
97cc3a071065: Pull complete
Status: Downloaded newer image for dev-nexus.krg.no/personws:104
I’ll attach error message and one of the different external feed setting I tried,
I have managed to get around the problem by setting insecure registries in daemon.json on the tentacle server. Now it pulls the image correct from Nexus but the run command does not find the image.
I can see that the images is on the tentacle with the correct name.
Thanks for reaching out, sorry to hear about the issues you’re having.
Could you please do something as a test? Could you remote into the tentacle in question and run
docker ps -a and see if the image is on the machine?
Could you also please turn on verbose logging, create a new release, and run the deployment again and attach/DM a full task log so I could take a look?
Hi Jeremy and thanks for the response.
This is what docker ps -a gives me (version 106 is my latest build):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b26af823a37 dev-nexus.kreftregisteret.no:5000/personws:106 "java -Djava.securit…" 17 hours ago Exited (130) 17 hours ago strange_mclaren
53fe35cf6d41 dev-nexus.kreftregisteret.no:5000/personws:106 "java -Djava.securit…" 19 hours ago Exited (1) 19 hours ago vibrant_germain
And here are the result of the verbose logging:
verboselog.txt (45.8 KB)
I took a look at the log and this jumped out at me.
07:10:27 Verbose | Docker version 19.03.7, build 7141c199a2
07:10:27 Verbose | docker run -d --label Octopus.Release.Number=0.0.27 --label Octopus.Project.Id=Projects-43 --label Octopus.Environment.Id=Environments-2 --label Octopus.Deployment.Id=Deployments-248 --label Octopus.Action.Id=232447cd-3c78-4511-a809-f9ed9ec00e40 --volumes-from=/usr/personws/logs/archived:/usr/personws/logs/archived --volumes-from=/usr/personws/logs:/usr/personws/logs --publish 90:90 --env SPRING_PROFILES_ACTIVE=Development
07:10:27 Error | /etc/octopus/Tentacle/Work/20200617051026-4755-610/Script.sh: line 5: dev-nexus.kreftregisteret.no:5000/personws:106: No such file or directory
07:10:27 Error | "docker run" requires at least 1 argument.
The image name is getting pushed to a separate line of the run command. Is there anything in your setup or environment that might be causing this? Can you go back in the step and make sure theres no accidental newlines that could be causing it?
If none of that works can you please send me the deployment process JSON? To get this go to the Project, then the process section, then click the 3 dots to the right of add step and click download JSON.
Thanks for quick response Jeremy,
I tried a lot of things but no luck. The project was quite small so I deleted it and started a new one. There must have been some bad characters somewhere, the new project works.
You’re very welcome. Thank you for the update. I’m glad to hear you got it going. I wonder what was causing the new-line in the other project. The important part is you’re good to go now.
Have a great rest of your week and please feel free to reach out if you need any help in the future.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.