Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- ###############################################################################
- # Bash best practice
- ###############################################################################
- # Exit on error. Append "|| true" if you expect an error.
- set -o errexit
- # Print a helpful message if a pipeline with non-zero exit code causes the
- # script to exit as described above.
- trap 'echo "Aborting due to errexit on line $LINENO. Exit code: $?" >&2' ERR
- # Exit on error inside any functions or subshells.
- set -o errtrace
- # Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
- set -o nounset
- ###############################################################################
- # Functions
- ###############################################################################
- echo "Step 1"; echo; echo; sleep 1;
- docker build -t machinepacket .
- echo "Build docker image: "; echo; echo;
- echo "Step 2"; echo; echo; sleep 1;
- docker run --rm -it machinepacket \
- docker-machine create sloth --driver packet --packet-api-key=q09rghq309ghq309ghq0395gh --packet-os=ubuntu_16_04 --packet-project-id=DIVA03 --packet-facility-code "ewr1" --packet-plan "baremetal_0"
- # Buzz me on Slack
- # /create a function via cmd.sh
- echo "Step 3 - Done"; echo; echo; sleep 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement