Skip to content

Instantly share code, notes, and snippets.

@bkon
Last active October 31, 2016 05:47
Show Gist options
  • Save bkon/04058ff8da52cf05e224bc6b736c3519 to your computer and use it in GitHub Desktop.
Save bkon/04058ff8da52cf05e224bc6b736c3519 to your computer and use it in GitHub Desktop.
CONFIG="sudo /opt/elasticbeanstalk/bin/get-config container"
DEPLOY_IMAGE_FILE=`$CONFIG -k deploy_image_file`
DEPLOY_IMAGE=`cat "$DEPLOY_IMAGE_FILE" 2>/dev/null || $CONFIG -k deploy_image`
E=`sudo /opt/elasticbeanstalk/bin/get-config environment | \
jq -r 'to_entries | map([.key, .value] ) | map(join("=")) | map("--env " + .) | join(" ")'`
sudo docker run --rm -it $E $DEPLOY_IMAGE bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment