Skip to main content
containerctl
============
A tool for building and running [Docker][2] containers.

Configuration
-------------
The containerctl commandline utility loads [Docker][2] container information from a `container.yml`
file in the current directory or the provided `path` directory which is an option to each command.
The `container.yml` file determines the user, name, version, path, and [fig][3] configuration of
the container.

The following directives are supported:

* `name` - The name part of the Docker tag. If of the form `user/name` the user part is
copied into `user`. This is the only required value.
* `user` - The user part of the Docker tag.
* `version` - Set to hardcode the version part of the container tag.
* `path` - The path to the directory containing the container's Dockerfile and context. Defaults to
the path value provided to containerctl which is usually cwd.
* `prebuild` - A command to execute just prior to calling `docker build` on a container.
* `fig` - [Fig][3] configuration. Used to run the container. The values of `user`, `name`, `tag`,
and `version` may be substituted into the [fig][3] configuration using the double-brace syntax.
So, for instance, {{tag}} would be replaced with the full tag name of the container.

The following config example would allow you to build an nginx container and run it with an example
website located in a separate container:

name: example/nginx
fig:
site:
image: example/website
nginx:
image: {{tag}}
ports:
- 80
volumes_from: site

Prebuild
--------
containerctl supports executing a script just prior to a build. By convention this should be an
executable file called `prebuild` in the container directory. If this file exists it will be
executed. A different prebuild command may be excuted by setting the `prebuild` configuration
directive.

Version Detection
-----------------
If no version is provided in the config file an attempt is made to detect the version of the
container. First the existance of an executable called `version` is checked for in the container
directory. If found the first line of this executable's output is used.

If the `version` executable does not exist an attempt is made to determine the current git tag of
the repository the container resides in. This will fail if the container is not in a git repo or
the git command is missing. If HEAD is not tagged then the short form of the commit hash is
appended to `rev-` to create a commit specific version.

Should none of the above attempts yield a version the container version will fall back to the
default value of `latest`.

Available Commands
------------------
The following commands are available to containerctl:

* `build` - Build the container. The container is tagged as `user/name:version`.
* `info` - Print information about the container.
* `push` - Push the container to the remote repository.
* `rm` - Remove the container's image from Docker.
* `run` - Run the container. Requires [fig][3].

These are just brief descriptions. See `containerctl help COMMAND` for full usage details of each.

License
-------
Copyright (c) 2014 Wifast, Inc. This project and all of its contents is
licensed under the BSD-derived license as found in the included [LICENSE][1]
file.

[1]: https://github.com/WiFast/containerctl/blob/master/LICENSE "LICENSE"
[2]: https://www.docker.com "Docker"
[3]: http://www.fig.sh/ "Fig"

Metadata

Release files for containerctl v0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for containerctl v0.0.1
File Size Uploaded
containerctl-v0.0.1.tar.gz 9.8 kB Details

Release files / containerctl-v0.0.1.tar.gz

Download URL containerctl-v0.0.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0f8097dbfba4d5bcd49a74812e93bbfef3de794a0ed0add55cf13064caf134ec
BLAKE2b-256 checksum
How to use checksums
d42ba22df329b618385bf99421a52bcd6f754aec0567d561b793d9c801d369d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3.2

1 release file

v0.3.1

1 release file

v0.2.2

1 release file

v0.2.1

1 release file

v0.2.0

1 release file

v0.1.4

1 release file

v0.1.3

1 release file

v0.1.2

1 release file

v0.1.1

1 release file

v0.1.0

1 release file

v0.0.2

1 release file

This release

v0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page