[gdal-dev] help with (docker) build workflow

Daniel Evans daniel.fred.evans at gmail.com
Sun Feb 19 10:36:20 PST 2023


Hi Michael,

The idea of a two-image build like this is explicitly to create a Runner
without all the compile dependencies, reducing the amount of baggage that
users of the Docker image end up having. That's why it doesn't copy over
all the dependencies for compilation, as you note! One of the downsides of
Docker is that everything that occurred in a previous layer is contained
forever, and starting with a fresh image and using COPY gets around that.

Without knowing your aim in detail, I'd say it sounds like you want to be
changing the builder step, modifying it to include whatever extras you need.

Alternatively, if you really do want to be building one or more new images
that include absolutely everything in the builder image, you probably want
to be using Docker's `FROM builder AS xyz` syntax.

Cheers,
Daniel

On Sun, 19 Feb 2023, 18:10 Michael Sumner, <mdsumner at gmail.com> wrote:

> I would like to build GDAL in an image on the basis of a dockerfile used
> for CI, I'm confused by the layer process that copies the build outputs for
> the final steps
>
>
> https://github.com/OSGeo/gdal/blob/master/docker/ubuntu-small/Dockerfile#L231
>
> I want to be able to run that image and then do my own builds with cmake -
> but the layer COPY process doesn't include cmake or the other prereqs used
> above (to save space in the image).
>
> Is it easy to include the build capability as a layer-copy step?
>
> Or is this perhaps a bad idea, I'm looking for the easiest way to get a
> build system running with docker - I can unpick the builder/COPY process,
> but maybe I'm missing something easy.
>
> Thank you
>
> --
> Michael Sumner
> Software and Database Engineer
> Australian Antarctic Division
> Hobart, Australia
> e-mail: mdsumner at gmail.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230219/1d17bb0a/attachment-0001.htm>


More information about the gdal-dev mailing list