Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DockerImage build step #572

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,053 changes: 1,035 additions & 18 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rand = "0.5.0"
argparse = "0.2.1"
log = "0.4.0"
env_logger = "0.5.6"
url = "1.0.0"
url = "2.2.2"
unshare = { version="0.5.0", optional=true }
signal = { version="0.6.0", optional=true }
mopa = "0.2.2"
Expand Down Expand Up @@ -51,6 +51,10 @@ serde_json = "1.0.2"
serde_derive = "1.0.11"
failure = "0.1.1"
resolv-conf = "0.6.0"
dkregistry = { git="https://github.com/anti-social/dkregistry-rs", rev="e720262" }
tokio = { version = "1", features = ["full"] }
futures = "0.3.18"
indicatif = "0.16.2"

[features]
default = ["containers"]
Expand Down
41 changes: 41 additions & 0 deletions docs/build_steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ of empty container):
* :step:`SubConfig`
* :step:`Container`
* :step:`Tar`
* :step:`DockerImage`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this option really use the "Docker" branding in the name? It'd be confusing for the Podman users as well for anything else coming later. I saw that the tests seem to refer to buildah and the OCI Images. So maybe just play with OCI instead of specific brand names?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly just Image would be ok. I don't know any other container standarts.

Another choice: FetchImage


Ubuntu Commands
===============
Expand Down Expand Up @@ -314,6 +315,46 @@ config if you use :step:`SubConfig` or :step:`Container`)
# Container built. Now, everything in BuildDeps(wget and curl) is removed from the container.


Docker Commands
===============

.. step:: DockerImage

.. warning:: Following functionality is experimental and is actively developed.

Downloads and unpacks a docker image.

Have 2 flavors. A short one::

- !DockerImage elasticsearch:7.13.4

And a full one::

- !DockerImage
image: elasticsearch
tag: 7.13.4

Options:

registry
(default ``index.docker.io``) A registry hostname.

image
(required) An image name. If namespace is missing ``library`` namespace will be used.
So ``python`` and ``library/python`` values point to the same image.

tag
(default ``latest``) A tag of the image.

insecure
(optional) If ``true``, an insecure client will be used. Only ``localhost``
registry is considered insecure by default.
See also :opt:`docker-insecure-registries` setting.

path
(default ``\``) A path inside a container where the image should be unpacked.


Generic Commands
================

Expand Down
8 changes: 8 additions & 0 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,13 @@ not to do so.
being built simultaneously. It makes little sense to enable it on
a workstation.

.. opt:: docker-insecure-registries

(default ``[localhost]``) A list of docker insecure registries. An insecure
registry works using only an unencrypted ``http`` protocol.
``localhost`` is always considered as insecure.

.. opt:: docker-registry-aliases

(default ``{docker.io: index.docker.io}``) A mapping of docker registry aliases.
Alias for ``docker.io`` is always added to the aliases mapping.
Loading