Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support for Git Bash and WSL #26

Merged
merged 5 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,13 @@ If you want to see how this workflow was developed, check out [Shipping Docker](

## Supported Systems

Vessel requires Docker, and currently only works on Mac and Linux.
Vessel requires Docker, and currently only works on Windows, Mac and Linux.

> Window support may come in the future. It will require running Hyper-V.
> Windows requires running Hyper-V. Using Git Bash (MINGW64) and WSL are supported. Native
Windows is still under development.

| Mac | Linux | Windows |
| ------------- |:-------------:|:-------:|
| Install Docker on [Mac](https://docs.docker.com/docker-for-mac/install/) | Install Docker on [Debian](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) | Not Currently Supported |
| Install Docker on [Mac](https://docs.docker.com/docker-for-mac/install/) | Install Docker on [Debian](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) | Install Docker on [Windows](https://docs.docker.com/docker-for-windows/install/) |
| | Install Docker on [Ubuntu](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) | |
| | Install Docker on [CentOS](https://docs.docker.com/engine/installation/linux/docker-ce/centos/) | |
19 changes: 13 additions & 6 deletions docker-files/vessel
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

UNAMEOUT="$(uname -s)"
case "${UNAMEOUT}" in
Linux*) MACHINE=linux;;
Darwin*) MACHINE=mac;;
*) MACHINE="UNKNOWN"
Linux*) MACHINE=linux;;
Darwin*) MACHINE=mac;;
MINGW64_NT-10.0*) MACHINE=mingw64;;
*) MACHINE="UNKNOWN"
esac

if [ "$MACHINE" == "UNKNOWN" ]; then
echo "Unsupported system type"
echo "System must be a Macintosh or Linux"
echo "System must be a Macintosh, Linux or Windows"
echo ""
echo "System detection determined via uname command"
echo "If the following is empty, could not find uname command: $(which uname)"
Expand All @@ -18,16 +19,22 @@ fi

# Set environment variables for dev
if [ "$MACHINE" == "linux" ]; then
export XDEBUG_HOST=$(/sbin/ifconfig docker0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1)
if grep -q Microsoft /proc/version; then # WSL
export XDEBUG_HOST=10.0.75.1
else
export XDEBUG_HOST=$(/sbin/ifconfig docker0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1)
fi
SEDCMD="sed -i"
elif [ "$MACHINE" == "mac" ]; then
export XDEBUG_HOST=$(ipconfig getifaddr en0) # Ethernet

if [ -z "$XDEBUG_HOST" ]; then
export XDEBUG_HOST=$(ipconfig getifaddr en1) # Wifi
fi

SEDCMD="sed -i .bak"
elif [ "$MACHINE" == "mingw64" ]; then # Git Bash
export XDEBUG_HOST=10.0.75.1
SEDCMD="sed -i"
fi

export APP_PORT=${APP_PORT:-80}
Expand Down