Drone

Drone is trying to pull local image on build step (1.0.0-rc.2)

Hello! I use locally prebuild image for the build step:

- name: build
  image: local-image-name

And this step fails with error:

“Error response from daemon: pull access denied for local-image-name, repository does not exist or may require ‘docker login’”

It seems like Drone is calling something like

$ docker pull someimg
Using default tag: latest
Error response from daemon: pull access denied for someimg, repository does not exist or may require 'docker login'

Everything was OK with Drone 0.8.

I was able to stop Drone from (re)pulling my image using pull: if-not-exists setting. Unfortunately, it is not documented anywhere on the readme website.

2 Likes

I created an account here just to thank @907th for providing his solution with pull: if-not-exists .

Cheers

@907th Thank you! It works!

This worked for me too, but I was wondering if there is a way to set an option globally as a default for all pipelines?

I’d prefer not to have to specify this explicitly in each pipeline as we almost always are using locally available images for our builds.

Thanks heaps
Fotis

It is default for all pipelines that use :latest. If you use versioned images (i.e. golang:1.12 instead of golang:latest) it will not automatically pull updates.

Beautiful stuff, thank you so much :slight_smile: