9 Commits

Author SHA1 Message Date
Dalton Durst
51537f17b1 docker: Add troubleshooting for permission errors on /dev/kvm
I got a `permission denied` error when trying to use the KVM fakemachine backend on a host. The Docker documentation indicates that "the docker container process runs with the supplementary groups looked up for the specified user," but I suspect this means the groups _inside_ the container are looked up. I added the owning group of `/dev/kvm` (which happened to be `kvm`) to the container and all is well.
2024-01-10 14:31:39 +00:00
Sjoerd Simons
69d35a46df Run a matrix of debos recipes as test
The docker-compose test strategy was mainly done for integration with
dockerhub, but as dockerhub no longer builds our images it's not that
relevant.

What's more interesting is to use the docker container we've build to
run a selection of debos recipes, whose successfull build indicate
success. This both makes it easier to test locally as well (just run the
debos recipe) and makes the test jobs more specific.

On top of the existing test this also adds a "debian" test which does some basic
debian smoketesting (debootstrap and apt) as well as a basic
"partitioning" test. The partitioning test unforutunately doesn't work
in the nofakemachine run as udev isn't available in the container, so
that only runs on UML and Qemu based backends.

Current the kvm backend isn't tested because the standard github action
runners don't support kvm. But qemu, though being lots slower, covers
some part of it.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-04-27 17:18:51 +02:00
Christopher Obbard
c66a48d699 Run recipe tests using UML on GitHub actions
Running the tests on the host is a good first step; to test Debos
properly we should run inside a Fakemachine. Since GitHub actions
do not support creating nested virtual machines, use the
user-mode-linux backend in Fakemachine to create a user process
to run the tests inside of.

Since Docker autobuild does not support UML the docker-compose
file purposely does not have a suffix of `.test.yml` so that the
test will not be picked up to run on Docker autobuild.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-07-07 22:11:52 +02:00
Christopher Obbard
429a0bb9a6 docker: Add information about unit and recipe tests to README
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-07-07 22:11:52 +02:00
Frédéric Danis
55070b66e0 docker: Container should be used as an executable
The usage of the container as an executable does not seems to be
straightforward.
Add a warning in docker/README.md and add container installation reference
in main README.md.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-16 15:49:00 +02:00
Frédéric Danis
9bc3ff0483 docker: Add an ENTRYPOINT to run container as debos executable
The ENTRYPOINT set the image’s main command, allowing that image to
be run as though it was that command. With 'docker run', the command
parameters could be passed directly after the container's name.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-09 17:14:20 +02:00
Frédéric Danis
bf4759357e docker: Add debos container test
This allows to automatically run debos unit test on dockerhub when
a build is triggered.
The unit test are run on "builder" target image, which needs to make
GOPATH available from the container and add go packages dependency for
the test.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-09 17:14:20 +02:00
Frédéric Danis
9527a19f62 docker: Update README
Move build and run explanations from scripts to README.md

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-09 17:14:20 +02:00
Maciej Pijanowski
43c00f6fbd docker: add basic docker support
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>

The problem with building for non-host arch as described in the:
https://github.com/go-debos/debos/issues/9 was resolved. Basic
arm64 example image building was tested on the Ubuntu 18.04.
This may enable more users to take advantage of the debos, as
using it on non-Debian distros seems either impossible or not
trivial.
2019-04-09 17:14:20 +02:00