Skip to content

Instantly share code, notes, and snippets.

@filipelinhares
Last active October 6, 2016 21:13
Show Gist options
  • Save filipelinhares/920157dc95a059b734e53dc04c789850 to your computer and use it in GitHub Desktop.
Save filipelinhares/920157dc95a059b734e53dc04c789850 to your computer and use it in GitHub Desktop.
Docker

Nivelando conhecimento

Colocar coisas em produção é um saco, dependency hell.

Como se fosse um chroot com esteróides.

Tudo isso através de containers. Docker não é uma VM.

Instalando docker

$ wget -qO- https://get.docker.com/ | sh
$ sudo usermod -aG docker <usuario>

Subindo um container Para inicializar um container basta rodar o comando docker run e passando como parâmetro a imagem que deve ser utilizada:

$ docker run --name container-teste ubuntu:14.04

Rodando isso ele vai retornar "ok" e mais nada.

Containers só são executados enquanto o comando especificado estiver vivo.

Deixando o container em pé

Alternative 1, interativa:

$ docker run -ti --name container-teste3 ubuntu:14.04 /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment