Skip to content

Instantly share code, notes, and snippets.

@hershkoy
Created June 29, 2021 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hershkoy/251a860cad7720268c1fa02c8c9eef51 to your computer and use it in GitHub Desktop.
Save hershkoy/251a860cad7720268c1fa02c8c9eef51 to your computer and use it in GitHub Desktop.
CLI fast doscker-compose ssh to container (by service name)
#!/bin/bash
# this uses docker-compose service name, not container
containername="$1"
docker-compose exec $containername bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment