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

Adding Windows Subsystem for Linux section to the windows documentation #2282

Merged
merged 4 commits into from Feb 28, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/contributing.md
Expand Up @@ -4,9 +4,9 @@
* Join our [Slack group](http://slack.testcontainers.org)
* [Post an issue](https://github.com/testcontainers/testcontainers-java/issues) if you find any bugs
* Contribute improvements or fixes using a [Pull Request](https://github.com/testcontainers/testcontainers-java/pulls). If you're going to contribute, thank you! Please just be sure to:
* discuss with the authors on an issue ticket prior to doing anything big
* follow the style, naming and structure conventions of the rest of the project
* make commits atomic and easy to merge
* discuss with the authors on an issue ticket prior to doing anything big.
* follow the style, naming and structure conventions of the rest of the project.
* make commits atomic and easy to merge.
* when updating documentation, please see [our guidance for documentation contributions](contributing_docs.md).
* verify all tests are passing. Build the project with `./gradlew check` to do this.
**N.B.** Gradle's Build Cache is enabled by default, but you can add `--no-build-cache` flag to disable it.
Expand Down
1 change: 1 addition & 0 deletions docs/supported_docker_environment/index.md
Expand Up @@ -12,6 +12,7 @@
| Mac OS X - Docker for Mac | 1.12.0 | *Support is best-efforts at present*. `getTestHostIpAddress()` is [not currently supported](https://github.com/testcontainers/testcontainers-java/issues/166) due to limitations in Docker for Mac. |
| Windows - Docker Toolbox | | *Support is limited at present and this is not currently tested on a regular basis*. |
| Windows - Docker for Windows | | *Support is best-efforts at present.* Only Linux Containers (LCOW) are supported at the moment. See [Windows Support](windows.md) |
| Windows - Windows Subsystem for Linux (WSL) | Docker v17.06 | *Support is best-efforts at present.* Only Linux Containers (LCOW) are supported at the moment. See [Windows Support](windows.md). |

## Docker environment discovery

Expand Down
19 changes: 19 additions & 0 deletions docs/supported_docker_environment/windows.md
Expand Up @@ -23,6 +23,25 @@ effort.

* WCOW is currently not supported, since Testcontainers uses auxiliary Linux containers for certain tasks and Docker for Windows does not support hybrid engine mode at the time of writing.

## Windows Subsystem for Linux

Testcontainers supports communicating with Docker for Windows within the Windows Subsystem for Linux *([**WSL**](https://docs.microsoft.com/en-us/windows/wsl/about))*.
The following additional configurations steps are required:

+ Expose the Docker for Windows daemon on tcp port `2375` without **TLS**.
*(Right-click the Docker for Windows icon on the task bar, click setting and go to `General`)*.

+ Set the `DOCKER_HOST` environment variable inside the **WSL** shell to `tcp://localhost:2375`.
It is recommended to add this to your `~/.bashrc` file, so it’s available every time you open your terminal.

+ **Optional** - Only if volumes are required:
Inside the **WSL** shell, modify the `/ect/wsl.conf` file to mount the Windows drives on `/` instead of on `/mnt/`.
*(Reboot required after this step)*.
Remember to share the drives, on which you will store your volumes, with Docker for Windows.
*(Right-click the Docker for Windows icon on the task bar, click setting and go to `Shared Drives`)*.

More information about running Docker within the **WSL** can be found [here](https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly).

## Reporting issues

Please report any issues with the Windows build of Testcontainers [here](https://github.com/testcontainers/testcontainers-java/issues)
Expand Down