• Stars
    star
    180
  • Rank 213,097 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build OCI images from Dockerfiles.

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/>.

More Repositories

1

paperback

Paper backup generator suitable for long-term storage.
Rust
1,146
star
2

filepath-securejoin

Proposed filepath.SecureJoin implementation
Go
85
star
3

mkonion

A simple way to create a Tor onion service for existing Docker containers.
Go
82
star
4

devgibson

Hackers in yo' kernel!
C
59
star
5

redone

A *correct* implementation of regular expression matching (using finite state automata).
Python
48
star
6

matrix-utils

Random matrix-related scripts.
Python
32
star
7

remainroot

A set of shims to allow unmodified programs to run nicely in rootless containers.
C
31
star
8

heisig-rtk-index

A Complete Index of Heisig's "Remember the Kanji" 6th Edition
Python
29
star
9

dotfiles

... everybody needs one, right?
Shell
29
star
10

rawline

A small, self-contained line editing library.
C
21
star
11

cyphar.com

My personal website.
Shell
18
star
12

initrs

[OUTDATED] Please switch to https://github.com/openSUSE/catatonit
Rust
17
star
13

voicemail-check

A small web app to check if your (Australian) voicemail is vulnerable to information disclosure.
Python
13
star
14

talks

Source for all talks I've presented at various conferences
PostScript
12
star
15

ascii-snake

A remake of the old Nokia Snake game.
C
12
star
16

sched

A simple scheduler (non preemptive) for the Arduino, written in C.
C
11
star
17

ttu

A small tool that silently converts TCP sockets to Unix sockets.
C
10
star
18

parcel

Proposal for an OCI image extensions for *completely static* distribution.
Go
7
star
19

synge

An unholy hack that can do too many things.
C
6
star
20

hacktoberfest-anti-spam

Automatically detects, closes, and flags PRs made by users who are likely to be part of the Hacktoberfest spam.
JavaScript
4
star
21

radial

A totally rad(ial) circular buffer implementation for GNU/Linux.
C
3
star
22

seccomp-nova

A new container-focused seccomp-cBPF generation library for runc.
3
star
23

ncss

My solutions for various NCSS Challenge years.
Python
3
star
24

keplerk2-halo

A research project to see if photometry can be done on halo contamination of K2 postage stamps.
Python
3
star
25

tic-tac-toe

A heuristic implementation of the classic game.
C
3
star
26

pure-quartic-solitons

PQS Research Project
Python
3
star
27

heartthreader

Mass, multithreaded testing for servers against Heartbleed (CVE-2014-0160).
Go
2
star
28

perfectgift

Group 4's 2014 NCSS Project.
Python
2
star
29

comp3520

COMP3520 2019
C
2
star
30

undertale-docker

Knowing that you can run UNDERTALE in a Docker container fills you with determination.
Shell
2
star
31

comp2129

COMP2129 2017
C
2
star
32

ncss-2020-syd-group1

"Should I Go Outside" Bot
Python
2
star
33

docksh

Use a Docker container as your shell.
Shell
1
star
34

jpn-stardicts

GitHub-based Mirror of Freely-Licensed Japanese Dictionaries
1
star
35

awful-travel-bot

An absolutely useless travel bot. It probably doesn't even know what countries are.
Python
1
star
36

ScrambleEbook

A calibre plugin to scramble eBook contents to be sharable (without infringing copyright) for bug reports.
Python
1
star
37

epyc

Embedded PYthon Code (a templating engine).
Python
1
star