I am experimenting with trying to make custom builds using Docker, rather than the ‘traditional’ envsetup.sh, lunch, mka method. My problem is that the prebuilt Docker image is missing a python module (the requests module) that is needed to do the customising.
Before I start down the rabbit hole of building my own Docker image, does anyone here know if it possible to “patch” a prebuilt Docker image, to e.g. install a missing pyython module?
I’ve done a quick online search, and found a few promising links, but if anyone here can give me a shortcut, or tell me definitely it can’t be done, I would be very grateful
import the current community Docker image in your own Dockerfile and install the missing package. Docker images are tarballed filesystem layers - it’s a minor addition. Anybody having the upstream image locally already can build it fast
FROM registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community AS cicd
RUN apt-get -qq update && apt-get install -y python3-requests
(current docker-lineage-cicd seems to use python3)
put this Dockerfile in its own folder and build with
I may try to build from source, as I want to use a different branch of the source than the one that is used to build the docker image that is pushed to Docker Hub. I imagine that will take a bit longer to build
Having investigated some more, I realise that there is no need to modify the Docker image: I can install the python module I need in a userscript that is run before the build starts
But I’ve learned a lot about how Docker and Docker Hub work, so the time has not been wasted