Skip to content

Instantly share code, notes, and snippets.

@KefDS
Last active January 18, 2017 14:32
Show Gist options
  • Select an option

  • Save KefDS/3ef1e437b87e29ca7d088173dae69350 to your computer and use it in GitHub Desktop.

Select an option

Save KefDS/3ef1e437b87e29ca7d088173dae69350 to your computer and use it in GitHub Desktop.
Refencia para docker

Bash function

Función para omitir escribir docker-compose exec --user "$(id -u):$(id -g). En .bashrc:

# Funcion para correr comandos en comandos en docker-compose
run() { docker-compose exec --user "$(id -u):$(id -g)" $1; }

Ejemplo de uso

run app rake db:create

Saber dirección IP de un contenedor

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <Docker ID or Name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment