-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(docker): add command to inject packed docker images into firmware images #119
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We add a small helper function to read file contents from the image programmatically.
We add helper functionality to determine the architecture for which an image was built. This feature relies on this information being stored in the os-release file.
With omnect-ui (and possibly other use cases) we want to inject docker images post-built via omnect-cli. This commit adds a new command that realizes this feature. To this end, we extend the omnect-cli to fetch docker images, pack them, and copy them into the platform image.
We update the test images to reflect the information currently supplied in /usr/lib/os-release. In particular, this now includes the `OMNECT_TARGET_ARCH` variable. The updated content reflects a build for `build-omnect-gateway-devel-rpi4-omnect-lab` and contains the following info: ``` ID=omnect-os NAME="dobi-OMNECT-gateway-devel" VERSION="4.0.18.0" VERSION_ID=4.0.18.0 PRETTY_NAME="dobi-OMNECT-gateway-devel 4.0.18.0" DISTRO_FEATURES="debuginfod ipv4 ipv6 polkit seccomp zeroconf bluetooth wifi wifi-commissioning flash-mode-2 flash-mode-3 iotedge persistent-var-log resize-data systemd virtualization" MACHINE="raspberrypi4-64" MACHINE_FEATURES=" apm keyboard screen touchscreen bluetooth wifi sdio vc4graphics" META_OMNECT_GIT_SHA="15bae4449c8246bc7cd497329ae61e8b3177880b" META_OMNECT_GIT_BRANCH="fix/os-release_target_arch" META_OMNECT_GIT_REPO="META_OMNECT_GIT_REPO_NOT_SET" META_OMNECT_VERSION="META_OMNECT_VERSION_NOT_SET" OMNECT_OS_GIT_SHA="OMNECT_OS_GIT_SHA_NOT_SET" OMNECT_OS_GIT_BRANCH="OMNECT_OS_GIT_BRANCH_NOT_SET" OMNECT_OS_GIT_REPO="OMNECT_OS_GIT_REPO_NOT_SET" OMNECT_OS_VERSION="OMNECT_OS_VERSION_NOT_SET" OMNECT_DEVEL_TOOLS=" curl e2fsprogs ethtool gdbserver htop iproute2-ip ldd less lshw lsof ltrace mmc-utils screen strace sysstat tcpdump valgrind " OMNECT_RELEASE_IMAGE="0" OMNECT_TARGET_ARCH="aarch64" ```
We add the mock feature to the omnect-cli to enable conditional compilation for some testing scenarios which require mocking.
We therefore also restructure the docker module with an inner module. This way we can encapsulate the used implementation depending on the `mock` feature flag.
JanZachmann
requested changes
Jun 6, 2024
We add an implementation of the display trait for the partitions to print them from omnect-cli.
We ensure that clap uses partition names as they are. Until now clap converts them to kebab-case, which leads to inconsistencies with the omnect-cli file copy-* commands.
We want to reuse the compression functionality for `File` types within the crate. Thus, we make the operations public. To this end we type to enclose compression options parameters to the value types.
We pack the docker image with xz, as such use the correct file suffix.
empwilli
force-pushed
the
feat/add_docker_image
branch
from
June 7, 2024 09:44
28828c3
to
3c80175
Compare
JanZachmann
requested changes
Jun 7, 2024
mlilien
approved these changes
Jun 10, 2024
JoergZeidler
approved these changes
Jun 10, 2024
JanZachmann
approved these changes
Jun 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.