- [Task] Add major version as suffix to Go module; allows to install Crane via go install
github.com/michaelsauter/crane@latest
-
[Feature] Accelerated mounts are now available in the free version - there is no separate pro version anymore
-
[Feature] Support
--runtime
-
[Task] As updates have become very infrequent, Crane no longer checks for updates.
-
[Task] Docs have moved to https://michaelsauter.github.io/crane/
-
[Feature] Support
external_links
config of docker-compose. See #344. -
[Task] Check for updates less frequently and allow higher timeout. Most importantly, check against the new domain, https://www.crane-orchestration.com. The old domain (and therefore the update checks) will cease to work 1st March 2019.
-
[Task] Update to Go 1.11 and use Go modules.
-
[Enhancement] Print given prefix when it is neither boolean nor string.
-
[Enhancement] Support
volumes_from
config of docker-compose (volumes-from
was already supported). -
[Enhancement] Add
--config
,-tag
and--prefix
flags to shortcut command if those flags are specified for the original Crane command as well.
-
[Bugfix] Fix broken
share-ssh-socket
by passing the value ofSSH_AUTH_SOCK
to the Docker flag, not the environment variable itself. -
[Enhancement] Add
--verbose
flag to shortcut command if original Crane command is run in verbose mode. -
[Enhancement] Add
(ad-hoc)
to log output when creating/running a container with an ad-hoc command.
-
[Feature] Add an easy way to share the SSH socket with a container by adding the
share-ssh-socket
configuration. -
[Feature] Implement shortcut commands. It is now possible to define commands in the
crane.yml
, which can be executed by runningcrane cmd <name>
. For example, one could defineconsole: run web rails c
to run a Rails console in an ad-hocweb
container withcrane cmd console
. Another use case is e.g.psql: exec postgres psql
to run PSQL inside thepostgres
container viacrane cmd psql
. -
[Enhancement] Improve CLI help output.
-
[Task] Check less frequently for updates (once every 14 days).
-
[Bugfix] Attach --volumes flag to
rm
command, notprovision
-
[Enhancement] Display proper error if non-existant network is referenced
-
[Bugfix] Create default network automatically.
-
[Bugfix] If
am logs
is passed a service which has multiple bind-mounts configured, Crane is now selecting the first accelerated one, not simply the first one (which might not be accelerated).
-
Remove broken flag
crane start --attach
. This flag was introduced in 3.3.0 but did not work properly, and doesn't add much value anyway. It would make more sense to have this flag oncrane run
, but that is left for another version. -
Apply
--interactive
todocker start
only if--attach
is already passed to it. -
Do not output container ID after
docker create
duringcrane run
as the container name is printed afterdocker start
anyway.
-
Do not add
--interactive
to non-targeted containers, otherwise Docker attaches to them. -
Do not try to connect containers with the default network when none has been setup (which is the case when prefixing is disabled).
-
Raise minimum Docker version to 1.13, as this is the first version to support
docker create --rm
, which is needed since 3.3.0 to run ad-hoc commands.
-
Caution! Enable prefixing by default again. This restores 3.0 behaviour and makes Crane more compatible with docker-compose. If you don't want this, configure
prefix: false
. However, doing this will also disable the new, automaticdefault
network described in the next section. -
Caution! Create a
default
network automatically (if prefixing is enabled, which is the new default), and connect every container to it (using its name as an alias). This is the same behaviour that docker-compose has. -
Allow multiple networks to be configured under
networks
, as well as options for each network:--alias
(array),--ip
(string) and--ip6
(string). -
Add
--init
option -
Fix
--dns-search
option -
Ensure that accelerated mounts are started when starting / unpausing a container
-
Add subcommand
am reset <mount>
to reset an accelerated mount (removes sync container and volume). -
Add subcommand
am logs <mount>
to show the Unison logs to debug syncing issues. Use--follow
/-f
to follow the logs. -
Allow service names as accelerated mount as well. If a service is given, all configured bind-mounts of that service are accelerated. If a single bind-mount is given, only this mount is accelerated. Service names can also be passed to
am reset
(resulting in the reset of all configured bind-mounts) andam logs
(if more than one bind-mount is configured, the first one is selected). -
Accelerated mounts have learned a new option
ignore
, e.g.ignore: "Name {.git,*.md}"
. This is much easier than having to set all flags if you only want to customize which files/folders should not be synced. -
The
start
command has learned the new option--attach
to attach to a targeted container even if the configuration specifiesdetach: true
. -
The
version
command queries for newer versions now. This update check is also executed automatically before any command if the last check is more than one week ago. See the section about updating to find out more.
- Fix non-accelerated mounts if acceleration is enabled in general
The following changes only affect the PRO version:
- Rename
mac-syncs
toaccelerated-mounts
, as it is available on Windows as well now. Usingmac-syncs
in the config still works but is deprecated. - Installation of Unison / Unox is not needed anymore, accelerated mounts work out-of-the-box and have no host dependencies.
- Accelerated mounts always start automatically once configured.
- The
mac-sync
subcommand has been removed without replacement (for now).
CLI interface changes:
lift
command is now an alias forup
againrm
command accepts-f
(short for--force
) again
Configuration changes:
cmd
config is now an alias forcommand
again
Behaviour changes:
- Prefixing is disabled by default again - this is a breaking change from 3.0.0,
and restores Crane 2.x behaviour. To set a prefix like docker-compose based on the containing folder, you now need to configure
prefix: true
explicitly. - Crane does not create a
default
network anymore - this is a breaking change from 3.0.0 as well and restores Crane 2.x behaviour. You need to configure all networks explicitly. - When
detach
is configured explicitly, it is honoured (thanks @inthroxify)
Other changes:
- Built using Go 1.8.3
As this is a major release, lots of things have changed. Please review the following list very carefully and adjust as needed.
CLI interface changes:
lift
has been renamed toup
(3.1.0 addslift
again).rm
doesn't have the short flag-f
anymore, but--force
still works (3.1.0 adds-f
again)rm
learned--volumes
to removed associated volumes, tooexec
adds--interactive
and--tty
by default, and supports specifying--privileged
and--user USER
- The short-hand for
--exclude
is-x
now - Dynamic targets (
+affected
/+dependencies
) have been dropped, but it is still possible to extend a target to all dependencies by using--extend
/-e
.+affected
was mainly useful with legacy links and should not be needed with the "new" networks. If you used it regularly, please open an issue. up
/run
by default attach to the target, and detach from dependencies. If the target is configured to detach (either via file or--detach
/-d
) however, thenlift
/run
detach from the target, too.- The configuration flag
--config
/-c
can be repeated now. The specified configurations are merged together, last one wins. Multiple configuration files can also be set viaCRANE_CONFIG
by separating the files via colons. Consequently, the--override
flag has been dropped.
Configuration changes:
- The parameters for
stop
,start
andexec
have been removed. The corresponding CLI commands have learned some of the options to mitigate this. - The top-level configuration key
containers
has been renamed toservices
to align with docker-compose. - All
run
parameters have been moved up one level to align with docker-compose. cmd
has to be specified ascommand
now (3.1.0 addscmd
again).image
is optional now. If it is not given, the service name will be used as the image name.stop-timeout
,sysctl
anduserns
can be configured now.- Most configuration keys have an alternative name now, e.g.
publish
can now be specified asports
. The alternative name is the one that docker-compose uses. This allows Crane to read docker-compose configuration files, with some minor exceptions. net
also allows the formservice:<container>
now.- Support
--health-cmd
,--health-interval
,--health-retries
,--health-timeout
and--no-healthcheck
. Configuration via docker-compose'shealtcheck
object is also possible (though only string is supported fortest
at the moment).
Behaviour changes:
- Crane reads
docker-compose.yml
,docker-compose.override.yml
,crane.yml
,crane.override.yml
by default now (in this order). - To align with docker-compose, Crane sets a default prefix now, which is the
name of the directory where the configuration files are in. You can remove
the prefix by setting
prefix: false
in the configuration or by passing--prefix=""
/-p ""
or exportingCRANE_PREFIX=""
(Careful! 3.1.0 reverts this to 2.x behaviour). - If neither
net
,network_mode
ornetworks
is configured, the default network mode is no longerbridge
but adefault
network to align with docker-compose (Careful! 3.1.0 reverts this to 2.x behaviour). - The integration of Unison on macOS has been extracted into a paid pro version, see www.crane-orchestration.com. There is still a free version for macOS without this feature. If you would like to support Crane, you can also buy a pro version for Linux, but right now there is no difference in functionality.
-
Allow to override configuration by another configuration file. By default, Crane is looking for e.g.
crane.override.yml
if the config file in use iscrane.yml
. This can be customized via--override
/CRANE_OVERRIDE
.@michaelsauter
-
Add
--debug
flag tocrane mac-sync start
which turns on verbose logging and runs the sync in the foreground.@michaelsauter
-
Add image, flags, uid and gid to md5 hash identifying the Mac sync server.
@michaelsauter
-
Check Unison client as well when determining whether a Mac sync is running.
@michaelsauter
-
Add
autostart
option to Mac syncs.@michaelsauter
-
Allow to pass relative host directories to
mac-sync start/stop
.@michaelsauter
-
Print error message when volume passed to
mac-sync start/stop
is not configured.@michaelsauter
-
Optional Unison sync for Docker for Mac to improve performance. For more information, see Docker for Mac with Unison sync.
@michaelsauter
-
Built with Go 1.7.1, which might solve potential issues with macOS Sierra.
@michaelsauter
-
Fix tag override for images with no tag specified in the config.
@michaelsauter
-
Add
--dry-run
option to see what a certain command would do without actually doing anything.@michaelsauter
-
Add
--subnet
support for networks@michaelsauter
-
Document
--only
flag@michaelsauter
-
Add more error output when hook execution fails
@michaelsauter
-
Fix usage of CLI long flags prefixed by
--no-
@bjaglin
-
Add support for
--no-stream
tocrane stats
(Docker >= 1.7)@bjaglin
-
Fix broken target when a default group is specified. The regression was introduced with #275, and reported in #285.
@michaelsauter
-
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.