Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build OCI images from Dockerfiles.

License

NotificationsYou must be signed in to change notification settings

cyphar/orca-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orca-build allows you to build OCI images from aDockerfile orOrcafile. Itdoesn't require a daemon or root privileges to operate. It is a fairly smallPython wrapper around the following projects (which are obviously requirementsto useorca-build):

This was aSUSE Hackweek project and is mainly intended to be a simpletool for users that might want to create images as a rootless user, or to playaround with a simple PoC of how various OCI technologies can interact with eachother.

Usage

The usage is kinda likedocker build. You provide it a build context thatcontains aDockerfile andorca-build does the rest. I plan to add support forsome more of thedocker build flags in the near future, but at the moment itworks pretty well.

usage: orca-build [-h] [--clean] [--gc] [--output OUTPUT] [--verbose]                  [--rootless] [--build-arg NAME=value] [-t TAGS]                  ctxBuild an OCI image from a Dockerfile context. Rootless containers are alsosupported 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 standardDockerfile:

% 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 signaturesCopying blob sha256:ed6542b73fb1330e3eee8294a805b9a231e30b3efa71390f938ce89f210db860 47.09 MB / 47.09 MB [=========================================================]Copying config sha256:56fae18e2688b7d7caf2dd39960f0e6fda4383c174926e2ee47128f29de066cf 0 B / 805 B [-----------------------------------------------------------------]Writing manifest to image destinationStoring 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=opensuseID_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'show you installorca-build. It only depends on the standard library (andhaving the above tools in your$PATH).

% sudo make install

If you want to make sure thatumoci,skopeo andrunc will play nicelytogether, you can usemake check. It will attempt to run through a trivialusage of rootless containers with the tools above. If this fails, update yourinstallation accordingly. This tweaking should not be necessary in futureversions.

% make check

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

License

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

orca-build: container image builderCopyright (C) 2017 SUSE LLCThis program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program.  If not, see <http://www.gnu.org/licenses/>.

About

Build OCI images from Dockerfiles.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp