Commit Graph

17 Commits

Author SHA1 Message Date
David Cassany
38dbd7e76d Include '--delete' in OCI images DataSync
This commit includes #310 patch for OCI images.

It also corrects the end of line format for kiwi/container/docker.py
and test/unit/container_image_docker_test.py, so flake tests are all
green.
2017-04-24 12:29:44 +02:00
David Cassany Viladomat
269a220998 Merge branch 'master' into OCI_images_support 2017-04-24 12:18:53 +02:00
David Cassany
5d79d1580f Include --delete flag in DataSync for docker images
This commit includes the --delete flag in order to synchronize the
docker images. This is relevant for derived images where the new
layer might not only add files, but also remove something from the
base image.

Fixes #309
2017-04-20 12:55:24 +02:00
David Cassany
c35f9f3b23 Add support for OCI images
This commit adds support for OCI images. Most of the docker related
code is reused for OCI classes and Docker classes have been refactored
so now they are a splecialization of the OCI classes. It is done this
way since KIWI internally only uses OCI format to operate with
containers, therefore docker images just differ from OCI images by
the way they are packaged or unpackaged.
2017-04-19 16:44:33 +02:00
David Cassany
0fda4f84b3 Keep imported image in OCI format instead of docker
Kiwi always uses OCI format for container manipulations, so it is
easier to assume the image kept between prepare and create step
is also in OCI format, this way less format convertions are needed.
2017-04-04 15:34:10 +02:00
Marcus Schäfer
1516396640
Delete unused code
Also fixed corresponding unit test
2017-03-14 10:20:44 +01:00
David Cassany
98d56ea34f Refactored RootImport and included checksum validation
First, commit refactors RootImport in order to also copy
the imported image after sychronizing the import.

Second, it includes a checksum of the copied image which is
validated in later steps.
2017-03-13 20:20:24 +01:00
David Cassany
9e8eb94d6d Support for layered docker images
This commit includes support for building layered docker. A new
layer is added on top of the base image referenced by `derived_from`
attribute.
2017-03-13 20:20:24 +01:00
Marcus Schäfer
6cc0b2085d Flake cleanup for unit tests 2017-03-07 13:03:10 +01:00
David Cassany Viladomat
e88758988a Support container names with slashes (#254)
Umoci tool doesn't require any other parameter than a tag to
identify the container. So container_name value is not used in
umoci.

This Fixes#253
2017-03-02 17:14:52 +01:00
David Cassany
5685135acc Fix tagging for OCI images
This commit fixes the tagging schema for umoci. An OCI image
name is path[:tag], this commit rearranges some variable names to
avoid confusions between names and tags.

Fixes #249
2017-03-01 13:04:12 +01:00
Marcus Schäfer
3e6848ed88 Refactor docker container creation
Instead of creating a simple tarball the tools umoci and skopeo
from the docker tool chain are used to create official docker
images. Along with those tools more information to describe a
container has been added to the schema. A complete container
setup now consists of the following elements

<type image="docker">
    <containerconfig name="..." maintainer="..." user="..." workingdir="...">
        <entrypoint execute="command">
            <argument name="option"/>
            ...
        </entrypoint>
        <subcommand execute="command">
            <argument name="option"/>
            ...
        </subcommand>
        <expose>
            <port number="..."/>
            ...
        </expose>
        <volumes>
            <volume name="..."/>
            ...
        </volumes>
        <environment>
            <env name="variable" value="value"/>
            ...
        </environment>
        <labels>
            <label name="..." value="..."/>
            ...
        </labels>
    </containerconfig>
</type>
2017-02-27 15:28:38 +01:00
Marcus Schäfer
685c830e45 Add shared cache location to Defaults 2016-04-29 14:30:15 +00:00
Marcus Schäfer
e6cc5bfa09 Move from nose to pytest
nose is no longer maintained, thus we have to move to another
testing system. This commit updates the tox setup and all tests
to use pytest instead of nose.
2016-03-14 12:23:14 +01:00
Marcus Schäfer
10a036932f
Continue Refactor into subpackage
container and container_setup should have their own namespace
2016-02-29 11:02:58 +01:00
Marcus Schäfer
40e6308aa9 Port application from python 2.7 to 3.4
For new applications like this kiwi version and its use cases
it is better to base it on a more recent python version
2016-02-17 22:38:38 +01:00
Marcus Schäfer
d7ded563f3
Added ContainerImage class
Factory plus implementation for docker
2016-01-19 11:53:34 +01:00