You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Ensure your `.devcontainer/devcontainer.json` is configured to use your local image:
40
+
41
+
```json
42
+
"image": "svenklaassen/doubleml-docs:latest"
43
+
```
44
+
Note: The `.devcontainer/devcontainer.json` file is configured to use the pre-built image. If you want to build the container from scratch, uncomment the `dockerFile` and `context` lines and comment out the `image` line.
45
+
46
+
2. Open the `doubleml-docs` repository in VS Code:
47
+
48
+
```bash
49
+
code /path/to/doubleml-docs
50
+
```
51
+
52
+
3. Open the Command Palette (`Ctrl+Shift+P`) and select `Dev Containers: Reopen in Container`.
53
+
VS Code will use your locally built image.
54
+
55
+
### Build the documentation
56
+
57
+
Once inside the container, verify that you can successfully build the documentation:
58
+
59
+
1. Open a terminal in VS Code (`Terminal > New Terminal`)
60
+
61
+
2. Build the documentation:
62
+
63
+
```bash
64
+
cd doc
65
+
make html
66
+
```
67
+
68
+
3. Check the output for any errors or warnings
69
+
70
+
4. View the built documentation by opening the output files:
71
+
72
+
```bash
73
+
# On Windows
74
+
explorer.exe _build/html
75
+
76
+
# On Linux
77
+
xdg-open _build/html
78
+
79
+
# On macOS
80
+
open _build/html
81
+
```
82
+
83
+
If the documentation builds successfully and looks correct, your Docker image is working properly and ready to be pushed to Docker Hub.
84
+
85
+
## Step 4: Push to Docker Hub
86
+
87
+
Push your built image to Docker Hub:
88
+
89
+
```bash
90
+
docker push svenklaassen/doubleml-docs:latest
91
+
```
92
+
93
+
## Step 5: Using the Published Image
94
+
95
+
After publishing, there are two ways to use the image:
96
+
97
+
### Option 1: Manual Container Management
98
+
Pull and run the container manually:
99
+
100
+
```bash
101
+
docker pull svenklaassen/doubleml-docs:latest
102
+
# Then run commands to create a container from this image
103
+
```
104
+
105
+
### Option 2: VS Code Integration (Recommended)
106
+
Simply reference the image in your `devcontainer.json` file:
107
+
108
+
```json
109
+
"image": "svenklaassen/doubleml-docs:latest"
110
+
```
111
+
112
+
VS Code will automatically pull the image when opening the project in a container - no separate `docker pull` command needed.
This guide shows how to use WSL2 (Windows Subsystem for Linux), Docker Desktop, Visual Studio Code (VS Code), and how to work with Development Containers in VS Code on a Windows machine.
See [Docker Desktop Documentation](https://docs.docker.com/desktop/features/wsl/#turn-on-docker-desktop-wsl-2).
23
+
1. Open Docker Desktop.
24
+
2. Go to **Settings > General** and make sure **Use the WSL 2 based engine** is checked.
25
+
3. Under **Settings > Resources > WSL Integration**, ensure that your desired Linux distribution(s) are selected for integration with Docker.
26
+
27
+
### Install Extensions
28
+
29
+
1. Open Visual Studio Code.
30
+
2. Press `Ctrl+Shift+X` to open the Extensions view.
31
+
3. Search and install (includes WSL and Dev Containers Extensions):
32
+
-[Remote Development Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)
33
+
34
+
Helpful VS Code Documentations:
35
+
-[Developing in WSL](https://code.visualstudio.com/docs/remote/wsl)
36
+
-[Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)
37
+
38
+
39
+
## Step 2: Open the Development Container (Using Pre-built Image)
40
+
41
+
For faster setup, we'll use a pre-built Docker image:
42
+
43
+
1. Open the `doubleml-docs` repository in VS Code:
44
+
45
+
```bash
46
+
code /path/to/doubleml-docs
47
+
```
48
+
49
+
2. Open the Command Palette (`Ctrl+Shift+P`).
50
+
3. Type `Dev Containers: Reopen in Container`.
51
+
52
+
VS Code will pull the `svenklaassen/doubleml-docs:latest` image (if needed) based on `devcontainer.json` and open the project in the container.<br>
53
+
This approach is much faster than building the container from scratch. VS Code automatically downloads the image from Docker Hub if it's not already on your system.
54
+
55
+
56
+
## Step 3: Build the documentation
57
+
58
+
1. Open a terminal in VS Code (`Terminal > New Terminal`)
59
+
60
+
2. Build the documentation:
61
+
62
+
```bash
63
+
cd doc
64
+
make html
65
+
```
66
+
67
+
To build without notebook examples:
68
+
```bash
69
+
make html NBSPHINX_EXECUTE=never
70
+
```
71
+
72
+
3. View the built documentation by opening the output files:
0 commit comments