Hi,
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:
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
Login Succeeded
$ 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]
23f7bd114e4a: Pushed
latest: digest: sha256:0325f4ff0aa8c89a27d1dbe10b29a71a8d4c1a42719a4170e0552a312e22fe88 size: 528
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.
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
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.