Skip to content

Instantly share code, notes, and snippets.

@ValdasK
Created October 20, 2015 12:20
Show Gist options
  • Save ValdasK/de34964e8c0d92e9a0b3 to your computer and use it in GitHub Desktop.
Save ValdasK/de34964e8c0d92e9a0b3 to your computer and use it in GitHub Desktop.
Quick bash to docker container
#!/bin/bash
DIR=$(basename `pwd` | tr "[:upper:]" "[:lower:]" | tr -cd '[[:alnum:]]')
CONTAINER="${DIR//-}""_$1_1"
docker exec -ti $CONTAINER sh -c 'TERM=xterm bash'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment