Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting Up Docker

Setting Up Docker

1. Installing Docker

$ curl -sSL https://get.docker.com/ | 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 https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`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 :)

Bash
$ curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
ZSH
$ mkdir -p ~/.zsh/completion
$ curl -L https://raw.githubusercontent.com/docker/compose/$(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.