So I am trying to pull images from the amazon docker registry, I can get the pull to work in the first step, it correctly auths and pulls, however the second step fails it seems it still connects and try’s to pull the image and fails because in the second step it never runs the aws auth step.
Anyone have this working or able to share a working setup ?
Each pipeline step is an isolated container. The only way to share resources (e.g. generated credentials) between steps are with docker volumes. You should therefore figure out how to share the aws credentials between steps using a volume (see the docs for this). Or you should use a registry credential plugin to pull private images from ecr, which is the recommended approach (search forum for third party plugins that enable this).
I am using the plugin below which I found from searching the forum for how to pull from ecr, or are credential plugins different to normal plugin images ?
I did think about sharing the .docker file as a volume between the host then running auth then perhaps drone can use it when it pulls, i prefer the idea of not using the host if possible how ever.
I am using the plugin below which I found from searching the forum for how to pull from ecr, or are credential plugins different to normal plugin images
Cheers I see its quite a new project, but awesome will give it a try and see if that helps out.
I figured it would have to be a host volume, because the image is pulled and then the volume mounted, i assume a temporary volume would not be mounted to drone itself, and drone itself would pull the image then launch it.
the project / code is actually quite mature. It was part of the closed source 0.8 Enterprise Edition and was recently published to github and made public.
I am pulling the image in this fashion, seems its defaulting to https for the pull but the proxy is using http and it does not like you prepending http to the image am I missing something here ?
Or can i not use it locally in this way and need to proxy it through another server which adds the ssl, also seems I should be able to use the container name in place of the ip but this did not seem to work, should it ?
I believe this is controlled by Docker, not by Drone. If you want to pull a registry from a non-https endpoint you need to configure the host machine daemon appropriately. Registry | Docker Docs
Never managed to get the registry plugin to work because of the http error, ecr is https by default but I guess because I am not also hosting the plugin on https this is not working.
how ever I eventually found this snippet below in the forums, I would also like to know if the there is a repo for the docs as it would be nice to have these documented and I wanted to put in a PR.
Anyway pulling in the first stage then using never in all subsequent steps seems to solve the issue for me, would be nice to get the registry auth plugin working but for now at least this will do.