Giter VIP home page Giter VIP logo

edge-image-builder's Introduction

Edge Image Builder (EIB)

Building

EIB is intended to run inside a container. Some form of container build tool and runtime are needed, such as Podman.

Prerequisites

Before building the EIB image, make sure that you have the development headers and libraries for gpgme, device-mapper and libbtrfs installed on your system:

SUSE Linux:

sudo zypper install -y gpgme-devel device-mapper-devel libbtrfs-devel

Ubuntu:

sudo apt-get install -y libgpgme-dev libdevmapper-dev libbtrfs-dev

Fedora:

sudo dnf -y install gpgme-devel device-mapper-devel btrfs-progs-devel

Build the container (from the root of this project):

podman build -t eib:dev .

Running

NOTE: These docs are incomplete and will be fleshed out as the project matures. At some point when it's more mature, an example configuration directory will be added to this repository.

Image Definition

For details on how to create the configuration artifacts needed to build an image, see the Building Images guide.

Running EIB

The image configuration directory must be attached to the container at runtime. This serves as both the mechanism to introduce image configuration files and provide a way to get the built image out of the container and onto the host machine.

The following example command attaches the directory and runs EIB:

podman run --rm -it \
-v $IMAGE_DIR:/eib eib:dev /bin/eib build \
--config-file $CONFIG_FILE.yaml \
--config-dir /eib \
--build-dir /eib/_build
  • -v - Used to mount a local directory (in this example, the value of $IMAGE_DIR) into the EIB container at /eib.
  • --config-file - Specifies which image configuration file to build. The path to this file will be relative to the image configuration directory. If the configuration file is in the root of the configuration directory, simply specify the name of the configuration file
  • --config-dir - Specifies the image configuration directory. Keep in mind that this is relative to the running container, so its value must match the mounted volume.
  • --build-dir - (optional) If unspecified, EIB will use a temporary directory inside the container for assembling/generating the components used in the build. This may be specified to a location within the mounted volume to make the build artifacts available after the container completes. In this example, a directory named _build will be created in the image configuration directory and will persist after EIB finishes. This directory will contain subdirectories storing the respective artifacts of the different builds.
  • --validate - If specified, the specified image definition and configuration directory will be checked to ensure the build can proceed, however the image will not actually be built.

NOTE: When specifying packages for installation, you need to also pass the --privileged option as well. For more information on why this is needed, see the Package resolution design documentation.

Testing Images

For details on how to test the built images, see the Testing Guide.

edge-image-builder's People

Contributors

jdob avatar atanasdinov avatar dbw7 avatar rdoxenham avatar ipetrov117 avatar alknopfler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.