Setup C++ Dev Env in MacOS using Docker

One simple CLion template to setup c++ development environment in MacOS M1 with docker.

CLion Config

Local Setup

  1. toolchain

    local toolchain
  2. cmake

    local cmake

Remote Host Setup

  1. toolchain

    remote toolchain
    remote toolchain ssh
  2. cmake

    remote cmake
  3. deployment

    remote deployment connection
    remote deployment mapping
    remote deployment excludes

Docker Setup

  1. toolchain

    docker toolchain
  2. cmake

    docker cmake
  3. deployment

    docker deployment connection
    docker deployment mapping

Setup in VsCode

Build a linux/c++ development environment based on docker/vscode step-by-step

Reference

  1. Remote C++ Development with Docker and CLion (with X11)

    • This blog shared some code for building the base docker image, while its targeting of X11 make the whole thing much more complicated than what I want here.

  2. Using Docker with CLion

    • It shares the latest configuration in Clion for remote development with local sources.

  3. Remote with local sources

    • resync header search paths

Useful Commands

  1. ssh-keygen -f "$HOME/.ssh/known_hosts" -R "[localhost]:2222"

  2. ssh <server> -o StrictHostKeyChecking=no

Last updated

Was this helpful?