-
Implicit ad-hoc containers. The pre-defined
unique
key is removed in favour of treating every container as unique when a command is passed via the CLI. The container name is suffixed with a timestamp, and the following changes are made to the configuration:publish
,publish-all
,ip
,ip6
anddetach
are disabledrm
is enabled
Note that ad-hoc containers are not targeted by Crane in any way, e.g. when running
crane rm
.@michaelsauter
-
Add
--only
flag to restrict command to a container or group. This can be used for example to start one container without its dependencies.@michaelsauter
-
Rename short flag
--output
forgenerate
command from-o
to-O
since-o
is the short flag for--only
now. Since the generate feature is marked as experimental, this change is done in a minor version.@michaelsauter
-
Refactor
exclude
behaviour to make it easier to supportonly
in the future@michaelsauter
-
Add missing flags
--ip
and--ip6
from Docker 1.10 to Crane@dreamcat4
-
Better handling of incorrect syntax for
env
andlabel
configuration values@bjaglin
-
docker run/exec/start
flags catch-up in Crane configuration.@bjaglin
-
Add new
build-arg
key to thebuild
map. Equivalent ofdocker build --build-arg KEY=VALUE
Example:
containers: foo: image: foo build: context: "." build-arg: - KEY=VALUE
Requires Docker 1.9+
-
Do not require link containers when requires is set. This is a breaking change if you defined both
requires
andrun/link
, and relied on Crane resolving the containers defined only inrun/link
. Now, all entries inrun/link
are treated as aliases only, and Crane does not handle them specifically. This allows to have optional dependencies when using Docker 1.9+ networks.@michaelsauter
-
Update dependencies. While this should generally not have any side-effects, it is likely that coloring support was broken on Windows earlier and might be fixed now.
@michaelsauter
-
Limit the number of Docker calls when cascading commands to affected containers.
@bjaglin
-
Bugfix: Wait for post-start hook to complete. #258
Otherwise the hook runs in the background and does not block. @jesper
-
Bugfix: De-duplicate required volumes and networks in verbose output. #253
@michaelsauter
-
Expose level of concurrency when provisioning
lift
andprovision
commands can now be sped-up by passing a custom parallelism level via--parallel
/-l
. @bjaglin
-
Fix a few minor configuration parsing problems when using maps. @bjaglin
-
Allow usage of environment variables for all flags' defaults
Default for flag
foo-bar
can be provided via the environment variableCRANE_FOO_BAR
. @bjaglin -
Gracefully ignore excluded containers in IPC/net dependencies. @bjaglin
-
Support several references for exclusion
--exclude
can now be repeated on the CLI, and several values can be passed viaCRANE_EXCLUDE
using newline as a value separator. @bjaglin -
Add escape sequence for
$
in configuration$$
now expands to$
in all string configuration values. @bjaglin -
Add support for Docker networks
They can be configured via a top-level
networks
setting, and used from containers via e.g.net: foo
. @michaelsauter -
Add non-Docker dependency management
Containers learned a new top-level
requires
setting, which works exactly like links (minus the alias support) and can be used to reach dependent containers when relying on Docker networks. @michaelsauter -
Add support for Docker volumes
They can be configured via a top-level
volumes
setting, and used from containers via e.g.volume: ["foo:/path"]
. @michaelsauter
- Fix compatibility with engine < 1.8.0 and wrongly-forced option memory-swappinness on engine >= 1.8.0 @bjaglin
-
When calculating affected containers, only existing ones are taken into account now @bjaglin
-
Add flags
--ipc
,--memory-reservation
,--dns-opt
,--stop-signal
,--kernel-memory
,--group-add
,--memory-swappiness
@bjaglin -
Fix regression in
--net=container:foo
@bjaglin -
Fix removing containers when one or more of the targets is marked as unique but no container exists for it @michaelsauter
-
Add new
generate
command, which passes the targeted portion of the configuration through a given template to produce some output. -
Remove
graph
command. The same output can be achieved with the newgenerate
command specifying this DOT template. -
Unique containers can now be addressed by Crane later on, e.g. given a unique container
foo
,crane kill foo
will kill all instances offoo
. All other commands that did not work with unique containers previously, e.g.status
orlogs
will take unique containers into account now as well. -
Fix broken
stats
andlogs
commands if a prefix was given. -
Add
--tag
global flag, which overrides image tag part temporarily. A typical use of--tag
flag is to synchronize image tags with the tag of VCSs. You can also set the tag viaCRANE_TAG
environment variable. @t-suwaExample: If you specify a
--tag rc-2
, you will get these results:original image name overridden image name nginx nginx:rc-2 nginx:1.9 nginx:rc-2 repo/nginx repo/nginx:rc-2 host:5000/nginx host:5000/nginx:rc-2 -
[Internal] Introduce new
ContainerInfo
interface which is a subset ofContainer
. At the same time, clean up theContainer
interface to include only the externally used methods.
-
Add new
file
key to thebuild
map. Equivalent ofdocker build --file=<file>
Example:
containers: foo: image: foo build: context: "." file: other_dockerfile.dkr
@dreamcat4
-
Add support for
--dns-search
flag @scornelissen85 -
Fix broken
net
flag
- Fixes messed up output for
crane status
using Docker 1.8.
-
start
behaves likerun
did in 1.x,run
andlift
behave like their--recreate
counterparts in 1.x. The flag--recreate
was removed consequently. -
Remove multiple target handling. Commands can only be applied to a single target now, which can be either a group or a container. This simplification was needed for ad-hoc commands (see below).
-
Automatic resolution and handling of dependencies when creating and or starting containers. This is different to 1.x, in which the target needed to include all containers required for the command to succeed.
Example: Given a configuration with container
web
depending on containerdatabase
, in 1.x you could not usecrane run web
, since the linkeddatabase
was not included in the target. In 2.x however, Crane detects that a runningdatabase
is required forweb
to run, which means it will bringdatabase
into a running state (by executing the equivalent ofcrane start database
before dealing withweb
). Note that e.g.crane kill web
will only killweb
and do nothing todatabase
, since a normaldocker kill web
will succeed just fine. -
Extension of target to affected containers and/or dependencies. This replaces the cascade flags
--cascade-affected
and--cascade-dependencies
.Example: Given a configuration with container
web
depending on containerdatabase
, if you wanted to make sure bothweb
anddatabase
are recreated, you can use the targetweb
and extend it withdependencies
like so:crane run web+dependencies
.affected
works the other way around, so if you want to recreatedatabase
and all containers that depend on it, executecrane run database+affected
. You may also use the shortcutsd
anda
. -
Ad-hoc cmd for
lift
/run
/create
.Example: If you have a multi-purpose
ruby
container in your configuration, you can now run multiple commands, e.g.crane run ruby pry
andcrane run ruby irb
. -
Uniquely named containers. This configuration option (
unique: true
) allows multiple instances of one container configuration at the same time. Crane will append a timestamp (with millisecond precision) to the container name to make it unique. It is advised to use this together withrun: {rm: true}
since Crane is not able to e.g. kill unique containers. -
Remove
--ignore-missing
flag since it does not work well with the new dependency resolution. As an alternative, a new--exclude
flag has been introduced, which allows to exclude a group or a container.Example: Given a configuration with container
web
depending on containerdatabase
, you can just runweb
by itself usingcrane --exclude database run web
. -
Trigger
post-start
hooks afterstart
event is sent. Previously, it was executed after control was handed back to Crane, which could be very late in case the container attached to STDIN. -
crane exec
, which maps todocker exec
, but additionaly starts the targeted container(s) first if necessary. The optionsinteractive
andtty
can be configured underneath theexec
key in the configuration. -
Build hooks (
pre-build
andpost-build
) @t-suwa -
Remove
dockerfile
key. Instead, there is abuild
map now with acontext
key (which is the equivalent ofdockerfile
).Example:
containers: foo: image: foo build: context: "."
In the future, the
build
map might be extended with further options used bydocker build
. The map was introduced now so those changes can be made in a backwards-compatible way. -
Add
--prefix
option, which adds a prefix to each container name in the target.Example:
crane --prefix="foo_" run web
will runfoo_web
. -
Allow configuration to be specified via
CRANE_CONFIG
, and prefix viaCRANE_PREFIX
. @tmc
Required Docker version: >= 1.6
- Allow Crane config in filesystem root @bjaglin
- Support
--cpu-period
,--cpu-quota
,--oom-kill-disable
,--uts
and--blkio-weight
@bjaglin - Support
--since
flag for logs command @bjaglin
Required Docker version: >= 1.3
- Support for
--log-opt
- Execute commands in directory of config
- Don't provision the same image twice
- Speed up image check
Required Docker version: >= 1.3
Thanks a lot to @bjaglin and @jesper for the contributions!
- Allow Crane to be used inside sub-directories (similar to Git binary)
- Execute stop hooks also when a running container is killed or removed
Both changes are potentially breaking, so please check if you're affected.
Required Docker version: >= 1.3
- Only pull images for which no Dockerfile is specified
Required Docker version: >= 1.3
- Add support for
ulimit
,log-driver
,label
,label-file
andcgroup-parent
options - Add
crane pull
mapping todocker pull
- Add Windows exe (which may or may not work properly)
- Corrected dependency handling for
--volumes-from
when suffixes such as ro are used
Required Docker version: >= 1.3
Thanks a lot to @bjaglin for the contributions!
- Container hooks
--ignore-missing
flag- Support for multiple links to the same container
env
declaration as mapping- Improved docs
Required Docker version: >= 1.3
Thanks a lot to @bjaglin, @mishak87 and @adrianhurt for the contributions!
sig-proxy
option applied correctly
Required Docker version: >= 1.3
Thanks a lot to @bjaglin for the contribution!
- Add support for
mac-address
,pid
,read-only
,memory-swap
,security-opt
andsig-proxy
options crane stats
, mapping todocker stats
- Raise error if group reference is not a container
- Raise error if YAML is invalid
- Dump errors and verbose output to
STDERR
Required Docker version: >= 1.3
Thanks a lot to @lefeverd and @bjaglin for the contributions!
- Added
logs
subcommand mapping todocker logs
(thanks @bjaglin)
Required Docker version: >= 1.3
Please see the releases.