The command that can save you typing 15 characters or more, each time!
This plugins adds start
, restart
, stop
, up
and down
commands when it detects a docker-compose or Vagrant file
in the current directory (e.g. your application). Just run up
and get coding! This saves you typing docker-compose
or vagrant
every time or aliasing them. Also gives you one set of commands that work for both environments.
Vagrant doesn't have a down
, restart
, start
or stop
commands natively but don't worry, that's been taken care of
and running those commands will actually run vagrant's equivalent commands. Additional arguments will be directly
supplied to vagrant.
Command | Vagrant command | Docker command |
---|---|---|
up | up | up |
down | destroy | down |
start | up | start |
restart | reload | restart |
stop | halt | stop |
There is one extra command that doesn't map to either Vagrant or Docker natively. Currently it is only implemented for Docker and allows you to quickly open a shell in a container.
enter my-container # Spawns /bin/bash -l in my-container
enter my-container /bin/sh # Spawns /bin/sh in my-container (useful for Alpine based images)
- Clone this repository to
$ZSH_CUSTOM/plugins/appup
. - Edit your
.zshrc
and addappup
to the list of plugins.
antidote install mdeboer/zsh-plugin-appup
antigen bundle mdeboer/zsh-plugin-appup
zi load mdeboer/zsh-plugin-appup
- Clone this repository somewhere
- Edit your
.zshrc
andsource
theappup.plugin.zsh
somewhere:
This plugin has a few configuration options to customise its behaviour. Please make sure you define these in your
.zshrc
file before you load any plugins.
For more information about zstyle
, see the man page zshmodules(1)
.
Option | Values | Default | Description |
---|---|---|---|
':omz:plugins:appup:docker' check-started |
yes/no | no | Enable/disable checking if docker is running. |
':omz:plugins:appup:docker' docker-machine |
yes/no | no | If both docker (e.g. Docker Desktop) and docker-machine are installed, check if docker-machine (when yes ) or docker (when no ) is running. |
':omz:plugins:appup:docker' env-files |
array | Additional env files to load (if they exist) when running up (adds --env-file=... arguments to the docker compose command). |
zstyle ':omz:plugins:appup:docker' check-started yes
zstyle ':omz:plugins:appup:docker' docker-machine no
zstyle ':omz:plugins:appup:docker' env-files .env.foo .env.bar # Will also load .env.foo and/or .env.bar if they exist.
# Load the plugin here...