Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setting Up Docker

Setting Up Docker

1. Installing Docker

$ curl -sSL | sh

Test the installation by runing...

$ docker version

If you have problems with docker daemon not runing, run..

$ sudo usermod -aG docker $USER

Then restart your system, and try again by runing docker version

2. Installing Docker-Compose

$ curl -L`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose

If you have problems with permission, run both commands inside your sudo su bash.

Command-line Completion

This is an optional step :)

$ curl -L$(docker-compose version --short)/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
$ mkdir -p ~/.zsh/completion
$ curl -L$(docker-compose version --short)/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose

Include the directory in your $fpath, by adding in ~/.zshrc the following

fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -i

Then reload zsh runing source ~/.zshrc.

Testing Installation
$ docker-compose --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.