You probably need to start with a clear understanding about how the Drone pipeline works, what the
image property means, and so on. I haven’t found any “fundamental Drone concepts” documentation, but start by taking a look at the documentation about Pipelines and Images, and then take a look at the existing Plugin Marketplace (a slight misnomer, as you don’t have to pay).
For every step in the pipeline, the
image property tells Drone about an already built image that it should use to perform the actions you want. In your case, you want to “build a docker image”, so the build step should make use of the Docker plugin. More than likely, your
.drone.yml file will end up looking something like:
image: plugins/docker # <=== this is the plugin the "build" step uses
dockerfile: /tmp/Dockerfile # <=== this is your Dockerfile, so the plugin can find it
In addition to building the Docker image, you need to publish it to a registry somewhere, otherwise you won’t be able to make use of the newly-built image. The Docker plugin can also do this for you, if you’re publishing to the default Docker registry. If you’re using AWS or GCR or some other registry, you might need to use a different plugin instead of “docker”… it all depends on your particular scenario.