a821, thanks - I didn't hear of Buildah, and indeed it looks like the tool for that. The problem is that now I have a Dockerfile, and although Buildah can work with them, it is not optimal, as the image becomes actually larger than with Docker, and all the tools for preparing the image are still on it. When I will get to optimizing this container build process, I'll likely switch to using Buildah.
]]>Edit: A PKGBUILD is just a bash script. Theoretically you could do anything that your build user is allowed to in there.
A dockerfile in a package isn't really elegant regardless of the method used. Either you have the complete binary image as a source file or alternatively only the docker file as a source which will result in fetching files during build() or prepare() instead of the usual download step
]]>I do not see any complication. You could build the image in `build` and in `package` you `install` the resulting image in `$pkgdir/path/to/my/image`. Unless I'm missing something...
The complication is that the user who builds it needs to be in the `docker` group, and the Docker daemon needs to run for that. You can't add the user who builds the package to a group, or launch the Docker daemon from the PKGBUILD, can you?
]]>Can you please advise what would be the better way to build a Docker image during the package build?
]]>