Skip to content

Instantly share code, notes, and snippets.

View danfergo's full-sized avatar

Daniel Fernandes Gomes danfergo

View GitHub Profile
@danfergo
danfergo / docker_exec_alias.md
Last active February 25, 2019 14:05
Aliasing docker exec -it bash

How to alias docker exec (with autocompletion)

Aliasing docker exec -it some_container_name bash to d some_container_name.

Step 1.1 Add to your .bashrc

d(){
    docker exec -it $1 bash
}

Step 1.2 Then source it