-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-generate Gentoo docker images #80
Comments
Does this work with hub's autobuilding mechanism? It's elegant to use the autobuild since that can trigger downstream builds if anyone sets up a dependent image. |
I assume you are referring to this description of docker hub automated builds, which I have never used. My interpretation of the process, based upon...
... and ...
... and ...
... and ...
... is as follows. Scheduling/triggering
Build location Next steps |
If you look at the build settings on docker hub for an automated repository, you'll see configuration that specifies repository links. Once this link is input, when the linked image is built, the image currently being configured will also be built. There doesn't seem to be much documentation on the feature but I did find a blurb at the very bottom of this URL: https://docs.docker.com/v1.7/docker/docker-hub/builds/. Let me know if I can shed any more light on this but the easiest way to investigate would probably be to look through the docker hub interface (due to the lacking documentation). |
I see.
This is just setting in Docker Hub that lets you trigger builds of other projects when one project is complete. It implies they are all your own projects. My interpretation of your initial description implied there was a third party project involved. So, in final answer to your question ... I don't think this is really an exciting feature since any normal post-commit hook or post-build hook could trigger a build of a project you own anyway, but yes, it is fully supported. |
It may imply that they are all one's own projects but the links are truly arbitrary. For example, the gentoo images finish building and a project I own personally gets updated as a result. Thus, the third party project is involved. This is the only feature I utilize in a build system involving docker images and Gentoo. Without it I don't see much reason to use a build system. I don't want to host my own image building systems when solutions (quay and docker hub) already fill that need. I will concur that lxc-gentoo may not desire this but suggesting that lxc-gentoo can supplant the current docker build system isn't being sold very well at this point. |
@alunduil Well yes, the third party thing is supported... if it works now, it will work with an As for your other comments ... one could equally posit that suggesting that there is a current Gentoo docker build system that works isn't being sold very well at this point.
I think it would be easier to scratch it and replace with |
All valid points. Can you show what that would look like? I have the automated build triggers enabled to kick hub once a day. If you can show me the Dockerfile (possibly with a pull request against gentoo-docker-images), I'd possibly see what you're trying to argue for. Sorry if my post last night was a bit rambly, should've waited until today to respond. |
@mudler of Sabayon Linux /Gentoo has a docker Packer if you want Squashed containers. But as for ARM64 Gentoo Docker , I've tried a number of means to get one working , so far "Vanilla" works just fine , scratch stage-3 > / had i one of the nice Valkyrie Penguin pc servers (amr64 calverium the xfce/Debian docker would run it all day , gentoo lxc or docker image. ) I'm curious ESP as SECOPS , what +/- it has for Cloud security. other than run of the mill amd64 worms/virri wont run on it. https://hub.docker.com/r/necrose99/gentoo-arm64/ Gentoo has official scripts so far i've been meddling when i got time... of late its rare. I have a container to pull as a base , just getting the !@#$&%$# emulation to run would be a plus. Gentoo Stage-4's also usable in lxc , ++++ as a util can pack them for openstack on the fly. however getting arm64 in this package might be more of use , as I can drop in binfmt misc / qemu static etc. getting https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Compiling_with_qemu_user_chroot these bits to do in LXC for targets via lxc-gentoo might be of use. |
It could be useful to use
lxc-gentoo
to generatedocker
images.Build method
Basically all that a
docker
image generation based onlxc-gentoo
would need to do is:... then ignore the generated
lxc.conf
and run a command similar to the following to convert the root filesystem image generated in to a docker image base layer.In any event, something very close to this process should work just fine.
Additional optimizations would be to tweak
openrc
andinittab
for adocker
use-case.Scheduling
Triggering could be achieved either:
lxc-gentoo
that pass testing, updates tostage3
or updates to any packages inportage
pre-installed withinstage3
all trigger an automated rebuild.Output structure
A separate Data Volume Container for the portage tree could easily be auto-generated based upon polling for portage tree updates.
In any event, it seems
docker
is here to stay and the automated provisioning of such an image (or a range of such images) would be a good service for the Gentoo community.There seems to be an existing effort at gentoo/gentoo-docker-images however at a glance it appears to lack a lot of features we have, such as cryptographic validation, and to have been completely broken with no motion forward for at least a month or two. I have commented on two issues over there and asked them to consider using
lxc-gentoo
instead. We shall see if they respond.Note that an external portage tree (as a so-called Data Volume; associated with a so-called Data Volume Container) would be the way forward for smaller and longer-lasting images and easier production management.
Output versioning
Some investigation in to
docker
image versioning might be made for both the portage tree Data Volume Container image (probablyyyyymmdd
would be sufficient, though more frequent update based on UTC timestamp and change-detection based upon polling may be useful) and for arch/archvariant specific images. Currently,docker
appears to be only widely deployed onamd64
architecture, so it may be worth skipping builds for other architectures and their variants.Build infrastructure
We could use Travis CI as build infrastucture, since they support
docker
andsudo
-capable build environments. It seems they are not against uploading build artifacts, see built-in Amazon S3 upload docs ... presumably we can justscp
or HTTP POST new images someplace else, eg. back to github using something like this.It would be a good idea to aim for fully repeatable/deterministic builds, and the use of parallel build infrastructure on multiple CI providers for the explicit purposes of build pipeline security (do not trust one CI provider's infrastructure).
New github project option
Perhaps the best place for such a script and output is an entirely new project (thus allowing for 'releases' to differentiate between build output artifacts - ie. actually built images for
lxc
,docker
, or something else - and thelxc-gentoo
tool itself), however as it would be using this codebase it seems a reasonable place to discuss the options beforehand.The text was updated successfully, but these errors were encountered: