This repo contains a ready-to-use devcontainer-based development environment for building and testing the Aerospike Database Server on macOS with Apple Silicon (M1/M2/M3) using Docker and VSCode/Cursor. The root of this repository is mounted on the dev container so that changes made to source code cloned in this directory take effect both on the host machine and container.
-
macOS (Sonoma or later)
-
aerospike-serversource checked out:git clone https://github.com/citrusleaf/aerospike-server.git
your-project-root/
├── .devcontainer/
│ ├── Dockerfile # Defines Ubuntu-based dev image
│ └── devcontainer.json # Mounts and sets up workspace
├── aerospike-server/ # Your local source clone (you need to clone the server manually)
- Ubuntu 24.04 with:
- All build tools pre-installed (gcc, cmake, libssl-dev, etc.)
- SSH server (optional)
- File descriptor limits configured
- Support for:
- Git operations via mounted .gitconfig and .ssh keys
- Running on ARM Mac
- No automatic post-create build — you control when to build/run
- Easily customizable
- Open Cursor/VScode.
- Open the root project folder (the one containing
.devcontainer/). - When prompted, choose "Reopen in Container".
- Once inside the container terminal, run:
cd /workspace ./bin/install-dependencies.sh git submodule update --init --recursive make -j$(nproc)
- You're ready to develop, test, and run the Aerospike Server.
This setup mounts your Git and SSH settings from the host:
"mounts": [
"source=${localWorkspaceFolder}/aerospike-server,target=/workspace,type=bind",
"source=${env:HOME}/.gitconfig,target=/root/.gitconfig,type=bind",
"source=${env:HOME}/.ssh,target=/root/.ssh,type=bind"
]To avoid SSH permission errors inside the container:
chmod 600 ~/.ssh/id_*
chmod 700 ~/.sshAlso ensure GitHub is added to known hosts:
ssh-keyscan github.com >> ~/.ssh/known_hostsInside the container terminal:
git config --global user.name
git config --global user.email
ssh -T git@github.comTo rebuild the image manually:
devcontainer build --no-cacheOr with Docker directly:
docker build -t aerospike-dev -f .devcontainer/Dockerfile .