Commit Graph

22 Commits

Author SHA1 Message Date
Nalin Dahyabhai
e467bea0aa Add "add" and "copy" commands
Add "add" and "copy" CLI commands, which end up calling the same buildah
method, differing only in whether or not they tell it to attempt to
extract local sources when those sources appear to be archive files
("add" does, "copy" does not).

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-03-06 15:39:22 -05:00
Nalin Dahyabhai
a0d394af74 Try to import containers that we didn't create
When we're given the name of a container on the command line, make every
command that attempts to open an in-progress build container fall back
to creating a new build configuration file for the specified container
if the container exists but wasn't originally created for a build.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-24 15:18:35 -05:00
Nalin Dahyabhai
0bbb076df8 Fix a copy/paste error in an error message
When we encounter an error parsing the target (new) image name during
"commit", don't use the container's name in the error message where we
meant to mention the image's name.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-24 15:14:52 -05:00
Nalin Dahyabhai
c46716525c Make the runtime for "run" more configurable
Provide RunOptions which can be used to change the runtime to something
other than "runc", and add an option that allows passing in additional
global arguments for the runtime.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-17 13:58:11 -05:00
Nalin Dahyabhai
2963474e17 Add a "run" command, using runc
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-13 17:21:45 -05:00
Nalin Dahyabhai
eea9ad4a1f Correct a variable naming inconsistency
This was bound to get confusing later.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-10 15:34:04 -05:00
Nalin Dahyabhai
20f2cb9dbe Fix a number of issues flagged by golint
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-10 14:46:09 -05:00
Nalin Dahyabhai
0ab0890e4e Massive refactoring
Pull most of the core logic from the CLI into a package that should be
easier to consume as a library.  Add a "config" command that updates the
builder object's configuration.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-10 11:48:15 -05:00
Nalin Dahyabhai
1475aab796 First pass at converting docker image configs
First pass at converting configuration information from docker images to
the OCIv1 format.  Fix time zones for dates.  Take a guess at fixing the
order of history items.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-02 18:30:26 -05:00
Nalin Dahyabhai
10a8d3bf0b Make a note to distinguish compression of layers
Add a TODO note that, once we can pull in a newer image-spec, make use
of its new media type to distinguish between compressed and uncompressed
layers in the output image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-28 08:34:15 +01:00
Nalin Dahyabhai
a15a927d8d Compress committed image layers by default
When committing an image, default to compressing the layer using Gzip.
This can lead to problems pulling the image back out of
containers/storage if the package that pulls it out was built using a
different version of go, but it works around a problem where
containers/image might not be able to detect that an uncompressed layer
is actually a layer.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-28 08:18:02 +01:00
Nalin Dahyabhai
5a2e7ac561 Make the --signature-policy flag "from"-only
Change the --signature-policy flag from being a global option to being
specific to the "from" command, which is the only place it's used.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-28 06:09:49 +01:00
Nalin Dahyabhai
84afb117be Roll back to stable versions of some of our deps
Roll back to slightly older versions of some of our dependencies in
order to get them all to play well together.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 22:20:28 +01:00
Nalin Dahyabhai
02f30c773e Rename: lumper -> buildah
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 16:55:04 +01:00
Nalin Dahyabhai
59139af5c7 Add the container layer to the image metadata
Add the container's layer to the layer list in the image configuration,
along with a history entry for it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 15:38:32 +01:00
Nalin Dahyabhai
80691e654d mount: print the mountpoint
After we mount a filesystem, print the root filesystem location.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 15:37:15 +01:00
Nalin Dahyabhai
57841cce77 Rename: stevedore -> lumper
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 13:26:51 +01:00
Nalin Dahyabhai
4899f4f7fb Flesh out v1 image configuration a bit
Basically finish building v1 images.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 13:26:51 +01:00
Nalin Dahyabhai
eca2a67a47 Rough out the beginnings of v1 config updates
Rough out simple image configuration edits, though apparently there's
more out there than just OCI v1.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 12:29:37 +01:00
Nalin Dahyabhai
e1927c12bb Log when we finish reading a layer
Log a debug message when we're finished reading a layer, as we already
did for the configuration blob.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 12:28:41 +01:00
Nalin Dahyabhai
aa61e23080 Parameterize the binary name
We're going to change the package name, likely sooner rather than later,
so parameterize it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-27 12:28:12 +01:00
Nalin Dahyabhai
03b2e90dba Initial version, needs work
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-26 17:59:49 +01:00