Skip to content

Instantly share code, notes, and snippets.

View shkm's full-sized avatar
😵‍💫
Stumbling through life, one exception at a time.

Jamie Schembri shkm

😵‍💫
Stumbling through life, one exception at a time.
View GitHub Profile
@shkm
shkm / dcsh
Created August 27, 2021 10:12
dcsh: Shell into docker container
#!/usr/bin/env bash
# Tries to open a shell in the main docker container (e.g. it ends in 'app' or 'api')
# Given a param, uses that as a pattern to look for at the end of the container name.
#
# Usage:
#
# dcsh <container_pattern>
set -o errexit # Exit on most errors (see the manual)