Skip to content

Instantly share code, notes, and snippets.

@Johnz86
Created November 30, 2016 14:32
Show Gist options
  • Save Johnz86/08006c2266615e8dc71611dcced2662d to your computer and use it in GitHub Desktop.
Save Johnz86/08006c2266615e8dc71611dcced2662d to your computer and use it in GitHub Desktop.
Load docker environment in git bash on windows and start custom shell script
#!/bin/bash
#usage: source ./tasks/docker-setting.sh
echo "# Set environment variables in bash for default docker machine #"
echo -en "\n"
echo $(docker-machine env default --shell sh/bash)
eval $(docker-machine env default --shell sh/bash)
#!/bin/bash
source ./tasks/default-docker-setting.sh
echo -en "\n starting mongo with CONTAINER_ID "
MONGO_CONTAINER_ID=`docker ps -aq --filter=ancestor=mongo`
docker start $MONGO_CONTAINER_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment