Docker Brew
Dec 16, 2020 brew install docker-compose. In prometheus.yml, add the following. Obviously, you can alter the scrape interval: scrapeconfigs: - jobname: cadvisor scrapeinterval: 5s staticconfigs: - targets: - cadvisor:8080 Then you will have to alter or create the docker-compose.yml config file. Running K3d (K3s in Docker) and docker-compose. K3d is a utility designed to easily run K3s in Docker. It can be installed via the the brew utility on MacOS: brew install k3d rancher/k3s images are also available to run the K3s server and agent from Docker. Oct 18, 2017 Docker for Mac / Windows / Linux – This allows us to build, run and test Docker containers outside of Kubernetes on our local development machine. Minikube – This is a tool that makes it easy to run a single-node Kubernetes test cluster on our local development machine via a virtual machine.
Estimated reading time: 3 minutes
Compose comes with command completionfor the bash and zsh shell.
Install command completion
Bash
Make sure bash completion is installed.
Linux
On a current Linux OS (in a non-minimal installation), bash completion should beavailable.
Place the completion script in
/etc/bash_completion.d/
.Reload your terminal. You can close and then open a new terminal, or reload your setting with
source ~/.bashrc
command in your current terminal.
Mac
Docker Brew
Install via Homebrew
- Install with
brew install bash-completion
. After the installation, Brew displays the installation path. Make sure to place the completion script in the path.
For example, place the completion script in
/usr/local/etc/bash_completion.d/
.Add the following to your
~/.bash_profile
:- You can source your
~/.bash_profile
or launch a new terminal to utilizecompletion.
Install via MacPorts
Run
sudo port install bash-completion
to install bash completion.Add the following lines to
~/.bash_profile
:You can source your
~/.bash_profile
or launch a new terminal to utilizecompletion.
Zsh
Make sure you have installed oh-my-zsh
on your computer.
With oh-my-zsh shell
Add docker
and docker-compose
to the plugins list in ~/.zshrc
to runautocompletion within the oh-my-zsh shell. In the following example, ...
represent other Zsh plugins you may have installed.
Without oh-my-zsh shell
Place the completion script in your
/path/to/zsh/completion
(typically~/.zsh/completion/
):Include the directory in your
$fpath
by adding in~/.zshrc
:Make sure
compinit
is loaded or do it by adding in~/.zshrc
:Then reload your shell:
Available completions
Depending on what you typed on the command line so far, it completes:
- available docker-compose commands
- options that are available for a particular command
- service names that make sense in a given context, such as services with running or stopped instances or services based on images vs. services based on Dockerfiles. For
docker-compose scale
, completed service names automatically have “=” appended. - arguments for selected options. For example,
docker-compose kill -s
completes some signals like SIGHUP and SIGUSR1.
Docker Brew Install
Enjoy working with Compose faster and with fewer typos!