Windows with Docker
Local Development: Windows via WSL2 (Ubuntu) with Docker
If you're using Windows, the most robust way to run Linux containers is via WSL2 (Windows Subsystem for Linux) and Docker. Installing Docker Desktop on your windows machine is the best way to access Docker from within WSL2.
Step 1: Install WSL2 and Ubuntu
Follow the official guide:
https://learn.microsoft.com/en-us/windows/wsl/install
Once complete:
wsl --install
wsl -l -v # Confirm Ubuntu is installed and using version 2
Step 2: Install Docker Desktop for Windows
Follow the official guide: https://docs.docker.com/desktop/setup/install/windows-install
In this guide, use the WSL2 backend instructions.
Step 3: Pull JLab or Upstream Image
From WSL Ubuntu:
docker login codecr.jlab.org
docker pull codecr.jlab.org/scicomp/jlab-base:alma9.5
Or for a minimal alternative:
docker pull almalinux:9.5
Step 4: Run a Container with Volume Mounts
You can mount your Windows user directories through /mnt/c
:
docker run --rm -it \
-v /mnt/c/Users/<YourUsername>/Documents:/data \
codecr.jlab.org/scicomp/jlab-base:alma9.5
Inside the container:
ls /data
Notes for WSL2 Users
- File access is faster under /mnt/wsl or Linux-native paths than under /mnt/c.
- Windows paths are case-insensitive and may behave oddly with Unix tools.
- Be cautious with path length limitations and line endings (\r\n vs \n).
ℹ️ Treat WSL as your development sandbox. Use Git inside WSL, keep your projects in Linux-native folders, and mount only what you need from Windows.