Skip to content

Instantly share code, notes, and snippets.

@mz2
Created March 27, 2017 12:01
Show Gist options
  • Save mz2/561dd8a7b0b7133c58062fc246799a4c to your computer and use it in GitHub Desktop.
Save mz2/561dd8a7b0b7133c58062fc246799a4c to your computer and use it in GitHub Desktop.
Example script that can be used to execute a Vapor app inside Docker connected to the Xcode console
#!/bin/bash
# $PATH tweak done so this also runs from Xcode.
PATH="/usr/local/bin:${PATH}"
./kill-docker
docker run --rm -it -v $PWD:/vapor -p 5432 -p 8080:8080 \
-e HOST_IP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1') \
manuscript-annotations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment