Below are brief instructions for installing Docker on macOS, Windows, and Ubuntu. For more detailed or up-to-date information, consult the official Docker documentation.
-
Check System Requirements
- macOS must be 10.14 or newer (for Intel) or 11+ (for Apple Silicon).
- Virtualization enabled (usually by default on macOS).
-
Download Docker Desktop
- Go to the Docker Desktop for Mac page.
- Download the
.dmg
installer for your architecture (Intel or Apple Silicon).
-
Install & Launch
- Double-click the downloaded
.dmg
file. - Drag and drop the Docker.app icon to your Applications folder.
- Open Docker.app from Applications or Launchpad.
- Wait for Docker Desktop to finish starting (the whale icon in your menu bar turns stable).
- Double-click the downloaded
-
Verify
- Open a new terminal.
- Run
docker --version
to confirm Docker is installed and running.
Alternative (Open-Source)
If you don’t want to use Docker Desktop, you can install Docker Engine alternatives (like Colima or Rancher Desktop). Refer to their respective docs for installation steps.
-
Check System Requirements
- Windows 10 (Professional or Enterprise) or Windows 11.
- Hardware virtualization enabled in BIOS/UEFI.
- WSL 2 installed if you want best performance (WSL instructions).
-
Download Docker Desktop
- Go to the Docker Desktop for Windows page.
- Download the installer (
.exe
file).
-
Install & Configure
- Double-click the
.exe
installer. - Follow the wizard, enabling features such as “Use WSL 2 instead of Hyper-V” if desired.
- Once done, Docker Desktop will launch automatically.
- Double-click the
-
Verify
- Open PowerShell or Command Prompt.
- Run
docker --version
to confirm installation. - Optionally check
docker run hello-world
to confirm Docker is working.
Note on Windows Home
On Windows Home editions, you must use WSL 2 for Docker Desktop to run properly.
Docker Compose v2 is now distributed as a plugin alongside the Docker Engine. This is the preferred approach going forward.
- Uninstall old Docker versions (if any):
sudo apt-get remove docker docker-engine docker.io containerd runc
- Set up the Docker official repository:
sudo apt-get update sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Install Docker Engine:
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
- Install the plugin:
sudo apt-get install docker-compose-plugin
- Verify:
You should see something like:
docker compose version
Docker Compose version v2.x.x
Usage: Now, you’ll run Compose commands as:
docker compose up docker compose downrather than
docker-compose up
.
- Manage Docker as a Non-Root User:
By default, you need
sudo
fordocker
commands. If you want to run Docker/Compose withoutsudo
:Then log out and log back in (or runsudo usermod -aG docker $USER
newgrp docker
). - Test with a Simple Project:
Create a
mkdir test-compose && cd test-compose
docker-compose.yml
(orcompose.yaml
) like:Then run:services: hello: image: hello-world
- Compose v2:
docker compose up
- Compose v1:
docker-compose up
- Compose v2:
- Check Running Containers:
(or
docker ps
docker container ls
)
- Docker Docs: docs.docker.com
- macOS: Install Docker Desktop on Mac
- Windows: Install Docker Desktop on Windows
- Ubuntu: Docker Engine on Ubuntu
These steps should get you up and running with Docker on your preferred platform. If you encounter issues, check Docker’s official troubleshooting guides or consult community forums for help.
When you see the message:
Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
It means Docker cannot apply swap memory limits in containers on your current system—either because the cgroup memory subsystem (particularly for swap accounting) isn’t enabled or mounted. This will prevent ResearchSpace from starting. Here’s how to address it:
Depending on your distro and boot configuration, you might need to enable the memory cgroup at boot. Typically, you do this by adding kernel parameters in your bootloader configuration (e.g., GRUB).
- Edit your GRUB configuration file:
sudo nano /etc/default/grub
- Append the following to the
GRUB_CMDLINE_LINUX_DEFAULT
line:For example, it might become:cgroup_enable=memory swapaccount=1
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash cgroup_enable=memory swapaccount=1"
- Update GRUB and reboot:
sudo update-grub sudo reboot
After reboot, run:
docker info | grep 'Cgroup'
You should see references to memory cgroups being enabled, and the Docker warning about swap limit should go away.
Under WSL 2, Docker runs in a lightweight VM. By default, the VM’s kernel may have certain cgroup features disabled. You can control memory usage in the .wslconfig
file and/or the Docker Desktop settings. However, if you see this warning in WSL 2, it’s often just telling you that swap limiting isn’t supported in that environment. You’d have to adjust your WSL 2 configuration or Docker Desktop’s settings—there isn’t always a straightforward fix if the underlying kernel was compiled without swap accounting.