Skip to content

Commit b262a20

Browse files
rnorthBalmungSankiview
authored
Adding Windows Subsystem for Linux section to the windows docum… (#2282)
Co-authored-by: Luis Miguel Mejía Suárez <[email protected]> Co-authored-by: Richard North <[email protected]> Co-authored-by: Luis Miguel Mejía Suárez <[email protected]> Co-authored-by: Kevin Wittek <[email protected]>
1 parent 6ec63f8 commit b262a20

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

docs/contributing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* Join our [Slack group](http://slack.testcontainers.org)
55
* [Post an issue](https://github.com/testcontainers/testcontainers-java/issues) if you find any bugs
66
* 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:
7-
* discuss with the authors on an issue ticket prior to doing anything big
8-
* follow the style, naming and structure conventions of the rest of the project
9-
* make commits atomic and easy to merge
7+
* discuss with the authors on an issue ticket prior to doing anything big.
8+
* follow the style, naming and structure conventions of the rest of the project.
9+
* make commits atomic and easy to merge.
1010
* when updating documentation, please see [our guidance for documentation contributions](contributing_docs.md).
1111
* verify all tests are passing. Build the project with `./gradlew check` to do this.
1212
**N.B.** Gradle's Build Cache is enabled by default, but you can add `--no-build-cache` flag to disable it.

docs/supported_docker_environment/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| 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. |
1313
| Windows - Docker Toolbox | | *Support is limited at present and this is not currently tested on a regular basis*. |
1414
| Windows - Docker for Windows | | *Support is best-efforts at present.* Only Linux Containers (LCOW) are supported at the moment. See [Windows Support](windows.md) |
15+
| 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). |
1516

1617
## Docker environment discovery
1718

docs/supported_docker_environment/windows.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ effort.
2323

2424
* 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.
2525

26+
## Windows Subsystem for Linux
27+
28+
Testcontainers supports communicating with Docker for Windows within the Windows Subsystem for Linux *([**WSL**](https://docs.microsoft.com/en-us/windows/wsl/about))*.
29+
The following additional configurations steps are required:
30+
31+
+ Expose the Docker for Windows daemon on tcp port `2375` without **TLS**.
32+
*(Right-click the Docker for Windows icon on the task bar, click setting and go to `General`)*.
33+
34+
+ Set the `DOCKER_HOST` environment variable inside the **WSL** shell to `tcp://localhost:2375`.
35+
It is recommended to add this to your `~/.bashrc` file, so it’s available every time you open your terminal.
36+
37+
+ **Optional** - Only if volumes are required:
38+
Inside the **WSL** shell, modify the `/ect/wsl.conf` file to mount the Windows drives on `/` instead of on `/mnt/`.
39+
*(Reboot required after this step)*.
40+
Remember to share the drives, on which you will store your volumes, with Docker for Windows.
41+
*(Right-click the Docker for Windows icon on the task bar, click setting and go to `Shared Drives`)*.
42+
43+
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).
44+
2645
## Reporting issues
2746

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

0 commit comments

Comments
 (0)