All Projects → cyphar → Orca Build

cyphar / Orca Build

Licence: gpl-3.0
Build OCI images from Dockerfiles.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Orca Build

Clair
Vulnerability Static Analysis for Containers
Stars: ✭ 8,356 (+5155.35%)
Mutual labels:  containers, oci
Firecracker Containerd
firecracker-containerd enables containerd to manage containers as Firecracker microVMs
Stars: ✭ 1,130 (+610.69%)
Mutual labels:  containers, oci
Runc
CLI tool for spawning and running containers according to the OCI specification
Stars: ✭ 8,729 (+5389.94%)
Mutual labels:  containers, oci
Distribution
The toolkit to pack, ship, store, and deliver container content
Stars: ✭ 6,445 (+3953.46%)
Mutual labels:  containers, oci
Image Spec
OCI Image Format
Stars: ✭ 1,851 (+1064.15%)
Mutual labels:  containers, oci
Runv
Hypervisor-based Runtime for OCI
Stars: ✭ 798 (+401.89%)
Mutual labels:  containers, oci
Containerd
An open and reliable container runtime
Stars: ✭ 9,956 (+6161.64%)
Mutual labels:  containers, oci
Pouch
An Efficient Enterprise-class Container Engine
Stars: ✭ 4,483 (+2719.5%)
Mutual labels:  containers, oci
Go Digest
Common digest package used across the container ecosystem
Stars: ✭ 99 (-37.74%)
Mutual labels:  containers, oci
Artifacts
OCI Artifacts
Stars: ✭ 84 (-47.17%)
Mutual labels:  containers, oci
Gvisor
Application Kernel for Containers
Stars: ✭ 12,012 (+7454.72%)
Mutual labels:  containers, oci
Ignite
Ignite a Firecracker microVM
Stars: ✭ 1,954 (+1128.93%)
Mutual labels:  containers, oci
Tectonic Installer
Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Stars: ✭ 599 (+276.73%)
Mutual labels:  containers, oci
Crun
A fast and lightweight fully featured OCI runtime and C library for running containers
Stars: ✭ 990 (+522.64%)
Mutual labels:  containers, oci
Runtime
OCI (Open Containers Initiative) compatible runtime using Virtual Machines
Stars: ✭ 588 (+269.81%)
Mutual labels:  containers, oci
Kata Containers
Kata Containers version 2.x repository. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Stars: ✭ 1,053 (+562.26%)
Mutual labels:  containers, oci
Grype
A vulnerability scanner for container images and filesystems
Stars: ✭ 362 (+127.67%)
Mutual labels:  containers, oci
Cc Oci Runtime
OCI (Open Containers Initiative) compatible runtime for Intel® Architecture
Stars: ✭ 418 (+162.89%)
Mutual labels:  containers, oci
Rkt
[Project ended] rkt is a pod-native container engine for Linux. It is composable, secure, and built on standards.
Stars: ✭ 8,870 (+5478.62%)
Mutual labels:  containers, oci
Selinux
common selinux implementation
Stars: ✭ 107 (-32.7%)
Mutual labels:  containers, oci

orca-build

orca-build allows you to build OCI images from a Dockerfile or Orcafile. It doesn't require a daemon or root privileges to operate. It is a fairly small Python wrapper around the following projects (which are obviously requirements to use orca-build):

This was a SUSE Hackweek project and is mainly intended to be a simple tool for users that might want to create images as a rootless user, or to play around with a simple PoC of how various OCI technologies can interact with each other.

Usage

The usage is kinda like docker build. You provide it a build context that contains a Dockerfile and orca-build does the rest. I plan to add support for some more of the docker build flags in the near future, but at the moment it works pretty well.

usage: orca-build [-h] [--clean] [--gc] [--output OUTPUT] [--verbose]
                  [--rootless] [--build-arg NAME=value] [-t TAGS]
                  ctx

Build an OCI image from a Dockerfile context. Rootless containers are also
supported out-of-the-box.

positional arguments:
  ctx                   Build context which is used when referencing host
                        files. Files outside the build context cannot be
                        accessed by the build script.

optional arguments:
  -h, --help            show this help message and exit
  --clean               Remove all intermediate image tags after successful
                        build.
  --gc                  Run a final garbage collection on output image.
  --output OUTPUT       Path of OCI image to output to (if unspecified, a new
                        image is created in /tmp).
  --verbose             Output debugging information.
  --rootless            Enable rootless containers mode.
  --build-arg NAME=value
                        Build-time arguments used in conjunction with ARG.
  -t TAGS, --tag TAGS   Tag(s) of the output image (by default, randomly
                        generated).

Here's an example session of building a standard Dockerfile:

% orca-build -t some-tag .
orca-build[INFO] BUILD[1 of 2]: from ['opensuse/amd64:42.2'] [json=False]
orca-build[INFO] Created new image for build: /tmp/orca-build.r2xp0v8h
  ---> [skopeo]
Getting image source signatures
Copying blob sha256:ed6542b73fb1330e3eee8294a805b9a231e30b3efa71390f938ce89f210db860
 47.09 MB / 47.09 MB [=========================================================]
Copying config sha256:56fae18e2688b7d7caf2dd39960f0e6fda4383c174926e2ee47128f29de066cf
 0 B / 805 B [-----------------------------------------------------------------]
Writing manifest to image destination
Storing signatures
  <--- [skopeo]
orca-build[INFO] BUILD[2 of 2]: run ['echo', 'Hello orca-build!', '&&', 'cat', '/etc/os-release'] [json=False]
  ---> [umoci]
  <--- [umoci]
  ---> [runc]
Hello orca-build!
NAME="openSUSE Leap"
VERSION="42.2"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.2"
PRETTY_NAME="openSUSE Leap 42.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
  <--- [runc]
  ---> [umoci]
  <--- [umoci]
orca-build[INFO] BUILD: finished
  ---> [umoci]
  <--- [umoci]
orca-build[INFO] BUILD: created tags ['some-tag']

Installation

I don't know how to do the whole "installation" thing with Python, so here's how you install orca-build. It only depends on the standard library (and having the above tools in your $PATH).

% sudo make install

If you want to make sure that umoci, skopeo and runc will play nicely together, you can use make check. It will attempt to run through a trivial usage of rootless containers with the tools above. If this fails, update your installation accordingly. This tweaking should not be necessary in future versions.

% make check

I've only tested it with Python 3.6, but it should work with most modern Python 3 versions.

License

orca-build is licensed under the terms of the GPLv3 (or later).

orca-build: container image builder
Copyright (C) 2017 SUSE LLC

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].