Conversation
mislav
left a comment
There was a problem hiding this comment.
This looks good! I would just like to see pwd mounting between host and container filesystems to avoid the potentially brittle copying of files that are being worked on.
If we wanted to speed up the creation on this container, perhaps we can pre-package it and publish on GitHub Packages?
script/createrepo.sh
Outdated
| RUN yum install -y createrepo_c | ||
| RUN mkdir /packages | ||
| CMD touch /tmp/foo | ||
| COPY dist/*.rpm /packages/ |
There was a problem hiding this comment.
This copies rpm files from the host filesystem into the container, bloating it and preventing container reuse.
Would it be better to instead mount the directory from the host into the container using Docker volumes? That way the createrepo command can operate on rpm files and create the necessary directory structure straight on the host, without having to copy anything to-and-from the container.
Something like:
## Dockerfile:
...
ENTRYPOINT ["createrepo"]
## usage on the host:
docker run --rm --volume "$PWD":/packages --workdir /packages createrepo "$@"Now the current working directory is mounted as /packages inside the container and the createrepo command should be able to easily access it, including writing back to it.
|
Thanks very much for the docker tip @mislav , I was learning all this stuff for the first time and am much happier with the volume+run solution. This should be good to go now and if you're okay with punting on optimizing the speed of this I am too. |
mislav
left a comment
There was a problem hiding this comment.
Looks great. Thank you for testing this out!
Fixes #2851
As of Ubuntu 20.04, the
createrepocommand is no longer installable via official packages.We'd like to run our linux packaging automation on Ubuntu 20.04, so we needed a new way of running
createrepountil it's re-packaged in Ubuntu 21.04.This PR adds a script that users Docker to run a precompiled C version of createrepo in a Fedora
environment.
OPEN QUESTION : should we speed up the docker stuff, here? In theory I'd like to avoid having to re-pull the fedora base every run of our release pipeline. Is a docker hub image the answer? or is there another approach? I'll point out though that it didn't "feel" like it took that long in my prerelease test runs.