48 Commits

Author SHA1 Message Date
Christopher Obbard
e5b84f2752 docker: remove user-mode-linux backend support
Since the user-mode-linux backend is flaky in trixie remove the runtime deps
from the docker container so that it cannot be used.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
2025-10-29 10:27:53 +00:00
Christopher Obbard
a914c547b2 Revert "docker: Manually register binfmts"
With new qemu-user-static from trixie we no longer need to register
the binfmts manually.

This reverts commit 306d2ea194.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
2025-10-29 10:27:53 +00:00
Christopher Obbard
ed2c4ad3ab docker: upgrade container baseline to trixie
Since Debian trixie has now been released; upgrade the debos container
to the new release.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
2025-10-29 10:27:53 +00:00
Christopher Obbard
779ae30b21 Merge pull request #605 from go-debos/arm64-docker-build-speedup
Docker: Speed up runner builds by avoiding initramfs
2025-10-26 22:58:37 +00:00
Sjoerd Simons
136d1760e5 docker: Add hook to allow exposing local ca-certificates
To allow building in environments with TLS MITM proxies add a way to
expose the host cert store to the *build* container. This is needed for
for the copilot coding agent as that seems to run in such an environment
when the recommended firewall is enabled.
2025-10-25 22:29:29 +02:00
Sjoerd Simons
37f5516030 Docker: Speed up runner builds by avoiding initramfs
The runner images install a kernel, which pulls in initramfs-tools to
create an initramfs. For debos we don't need to have an initramfs, we
just need the kernel image. Generating this on the native
architecture (amd64) is reasonably fast. However in emulation, when
building for arm64, this is *very* slow.

In current github actions this change seems to save about 20 minutes per
docker build. For PR triggered runs this (which don't upload the
containers) this should save 20 minutes end-to-end (one build on the
critical path), while for runs that do it should save about 40 minutes
end to end (three builds, of which 2 on the critical path).
2025-10-25 16:11:51 +02:00
Dylan Aïssi
97ccaf0224 docker: use the new format for declaring labels
See: https://docs.docker.com/reference/build-checks/legacy-key-value-format/

This should remove warnings from github.

Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
2025-08-01 15:46:55 +02:00
Dylan Aïssi
d9ba6bab73 cmd: Add 'version' option
This 'version' option prints the debos version.

Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
2025-04-08 15:27:26 +02:00
Nicolai Buchwitz
b58fb75f5e actions: Add mmdebstrap action
Add mmdebstrap [1] as a faster and more flexible alternative to debootstrap.

[1] https://gitlab.mister-muffin.de/josch/mmdebstrap

Signed-off-by: Nicolai Buchwitz <nb+github@tipi-net.de>
2025-02-23 23:32:17 +01:00
Nicolai Buchwitz
a118f4da3a docker: Add arm64 builds to Dockerfile and CI
Convert Dockerfile so multiple target architecturebuilds are possible. Also
modify the CI pipeline, in order to built a single multi-platform container.

Note that at the current time-being docker cannot export multi-platform
containers without an intermediate registry. Thus only the amd64 image
is exported for the test stage. Nevertheless the arm64 image is built in
the pipeline and also published later to the registry.

Co-authored-by: Thomas Böhler <t.boehler@kunbus.com>
Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
2024-08-24 10:42:36 +02:00
Sjoerd Simons
9a548b999f docker: Add zstd to the docker image
zstd compresses as well as gzip or xz (depending on compression ratio)
but has superiour performance; Add it to the docker image so it can be
used in recipes more easily.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2024-02-27 08:55:46 +01:00
Sjoerd Simons
e869a3c887 docker: Use prebuild archlinux keyring
Currently rebuilding the arch keyring on Debian bookworm is broken as
the build depends  on newer sq options. There is no reason to re-build
the keyring though, debian also uses a pre-build version to package it
for example.

Switch to use a script to download the latest release from arch gitlab

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2024-02-26 21:11:54 +01:00
Christoph Müllner
3aebd283bd Docker: Add Debian ports keyring
This adds the Debian ports keyring, which allows debootstrapping
Debian port architectures (see https://www.ports.debian.org/).

Fixes #463.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
2023-12-21 23:01:06 +00:00
Christopher Obbard
d092c54254 docker: Install archlinux-keyring from source
The arch linux tests require a newer version of archlinux-keyring than
what is in Debian stable; so revert back to pulling the latest version.

This partially reverts 36cf33366b.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2023-12-07 10:07:07 +00:00
Klaus Goger
36cf33366b docker: update to Debian 12 (Bookworm)
Update parent image to bookworm.
This allows us to remove all the backports and also to build Ubuntu
images again as it requires dpkg zstd support.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
2023-11-02 13:05:55 +00:00
Emil Velikov
0f5cc52e07 tests: add basic Arch test suite
Nothing special here - a simple test.yaml akin to the existing ones.

The pacman.conf file is effectively vanilla config that comes with the
pacman package, while the mirrorlist file is a list of UK https mirrors
that I've been using for years.

Note that there is no canonical mirror for Arch. The top-level/tier 1
Arch server should _not_ be used as per the official recommendation.
Instead we use the mirrors set in the official arch docker tooling.

v2:
 - Also install archlinux-keyring and makepkg
 - Use arch + backend=qemu only testing matrix

v3:
 - Use the same mirrors as the Arch docker images tooling
 - Build and install pacman locally, until we get an official package

v4:
 - Remove the local pacman build - it's available in backports

v5:
 - Explicitly pull arch-install-scripts from backports, normal one lack
   pacstrap

v6:
 - Manually pull the latest keyring - Debian one is outdated

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2022-12-15 14:25:05 +00:00
Christopher Obbard
673fc9e77c docker: Install qemu-img disk imaging utility
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-05-18 18:05:51 +01:00
Christopher Obbard
8164d9a98e docker: Build using go modules
Since we are now building using go modules, let's remove
the hacks for various dependencies and build the docker
container using the go modules.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-04-14 21:14:27 +02:00
Christopher Obbard
a95ed8411f Revert "docker: Install qemu-user-static 6.0 to fix segfault"
This reverts commit 91af617bea.

qemu is no longer in experimental so the container build
will now fail. The required patches for qemu have been
backported into bullseye so let's revert using qemu from
experimental.

Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988174
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-10-04 09:26:59 +02:00
Christopher Obbard
ba83a9631f docker: dockerfile: install unzip for unit-test
The unit tests require the unzip package to be installed.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-07-07 22:11:52 +02:00
Sjoerd Simons
0dec131ed3 docker: Add some useful deployment tools
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-07-06 21:59:21 +02:00
Nguyen Thi Huong
fe62ce195a image-partition: add support for xfs
This patch adds support for XFS, including the ability
to specify the UUID through the fsuuid property of the
image-partition action.

Signed-off-by: Nguyen Thi Huong <huong4.nguyenthi@toshiba.co.jp>
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
2021-07-06 21:54:17 +02:00
Christopher Obbard
306d2ea194 docker: Manually register binfmts
Debian's qemu-user-static package no longer registers binfmts on postinst
when running inside a virtualmachine; dockerhub builds are now built inside
a vm so the binfmts are not generated inside the docker container.

Fixes: 91af617bea ("docker: Install qemu-user-static 6.0 to fix segfault")

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-05-28 16:24:37 +02:00
Christopher Obbard
91af617bea docker: Install qemu-user-static 6.0 to fix segfault
There are issues with qemu-user-static 5.2 crashing when attempting
to allocate guest memory when compiled as a proper statically-linked
binary.

From testing, qemu 6.0 fixes the bug but it's not yet clear which
patch fixes the bug. So until the correct patch is backported to
bullseye, let's install qemu from experimental to pickup the bugfix.

See: #245
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988174

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-05-26 08:33:10 +02:00
Christopher Obbard
da53d4b001 docker: Add git package
Add the git package to the docker image.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-04-29 11:42:55 +02:00
Christopher Obbard
59c38c76ed docker: Add zip package
Add the zip package to allow the cration of compressed zip archives.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-04-28 18:51:36 +02:00
Christopher Obbard
88464339d6 dockerfile: Add fakemachine uml backend support
The fakemachine uml backend uses user-mode-linux and libslirp-helper
packages available from bullseye, let's include those inside the container.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-03-23 10:54:58 +01:00
Christopher Obbard
6fbb5752d7 docker: Upgrade from buster to bullseye
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-03-23 10:54:58 +01:00
Christopher Obbard
bd53aff709 docker: Add equivs package
The equivs package is used to create dummy Debian packages which can
be useful in development to satisfy dependencies without installing the
real package. Note that this package is not the recommended way of
dealing with broken dependencies: a bug report should be filed instead.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-01-25 14:10:39 +01:00
Christopher Obbard
0303282b25 docker: Fix formatting
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-01-25 14:10:39 +01:00
Christopher Obbard
26945d8833 docker: dockerfile: install testify from source
Testify is currently not built unless the manual tests are ran at which
point testify compiliation fails due to requiring a newer version of
golang than in buster. Unfortunately the main branch is no longer
compatible, so install from source to get the unit tests running again.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2020-08-14 15:18:47 +02:00
Sjoerd Simons
1fde503ac7 docker: Add f2fs-tools for mkfs.f2fs
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2020-08-14 14:27:02 +02:00
Christopher Obbard
b86d0d4816 actions/image-partition: add support for setting partition type
Debos currently sets the partition type to filesystem type and
does not allow the partition type to be set from the recipe.

In some situations setting the partition type is required, so add the
property `PartType` to the Partition and set the partition type to the value
of that property. If the `PartType` property is unset, the original partition
type is retained thus not breaking backwards compatibility.

For msdos, the partition type should be hexadecimal and 2-characters long.
For gpt, the partition GUID should be in GUID format and 36-characters long.
Some examples and further reading is included in the documentation.

Resolves: #98

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2020-08-14 14:17:25 +02:00
Mylène Josserand
948e1e4564 docker: Add u-boot-tools package
Add the u-boot-tools package to be able to use binaries such as
mkimage in debos' recipes.

Signed-off-by: Mylène Josserand <mylene.josserand@collabora.com>
2020-04-28 12:23:16 +02:00
Jonah Brüchert
76419fc60b docker: Add unzip 2019-12-05 11:29:11 +01:00
Sjoerd Simons
112fcf5aef docker: Add pigz
pigz is a parallel gzip implementation allowing for faster compression.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-11-27 22:44:18 +01:00
Frédéric Danis
1a441c5839 docker: Re-order packages alphabetically
Ordered packages list simplify maintenance.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-06-11 16:49:30 +02:00
Frédéric Danis
9e8c0e575d docker: Add compression utilities support
Useful compression utilities which may be used by debos
Fixes #155

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-15 11:13:49 +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
0ec3327525 docker: Add LABELs to debos container
Add name, simple description, upstream URL and docker command to run it.

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
07927639a8 docker: Use local debos source for container build
Copy the local debos source during container build instead of downloading
master debos branch from github.
This allows to use docker container during debos development.

Add apt-transport-https, pkg-config and btrfs-progs packages to runtime
dependencies.
Remove dbus package which is not requested (see
https://gitlab.collabora.com/docker/debos/blob/master/docker/Dockerfile)

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-09 17:14:20 +02:00
Frédéric Danis
7ca7907ec2 docker: Move container to buster-slim
Move builder and runner stages to buster-slim to get newer versions
of go, deboostrap and libostree.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
2019-04-09 17:14:20 +02:00
Maciej Pijanowski
59f2ffd7b1 Dockefile: pass --no-install-recommends to apt install
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2019-04-09 17:14:20 +02:00
Maciej Pijanowski
3c3cddb480 Dockefile: add debos image phase dependencies
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2019-04-09 17:14:20 +02:00
Maciej Pijanowski
59d1d9ec85 Dockefile: remove outdated comment
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2019-04-09 17:14:20 +02:00
Maciej Pijanowski
edb4b6a9cc Dockerfile: remove non-free from backports list
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.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