Sign inSign up

theunsp/devenvcontainer-cpp

By theunsp

•Updated almost 2 years ago

This Docker image supports C++ development with interactive terminals and persistent volume storage.

Image
Developer tools
0

10K+

theunsp/devenvcontainer-cpp repository overview

⁠Overview

The image is designed to provide a development environment for C++ projects.

⁠Key Features
  • Container Name: devenvcontainer-cpp
  • User: The container runs with the user developer.
  • Interactive Terminal: The container is started in interactive mode with a terminal (-it).
  • Volume Mounting: A volume can be mounted to /home/developer/develop inside the container. This allows for persistent storage of development files.
  • User Scripts Mounting: A volume can be mounted to /home/developer/bin inside the container. This allows for persistent storage of the user's script files.
  • Base Image: The base image for this container is cppdevcontainer:<tag>.
⁠Usage

The container can be started with the following command:

docker run --name devenvcontainer-cpp --user developer -it -v /path/on/host:/home/developer/bin -v devenvcontainer-cpp-develop:/home/developer/develop theunsp/devenvcontainer-cpp:latest bash

This command will:

  1. Create and run a container named devcontainercpp.
  2. Use the developer user inside the container.
  3. Attach an interactive terminal session.
  4. Mount the /path/on/host directory to /home/developer/bin.1⁠
  5. Mount the devcontainercppdevelop volume to /home/developer/develop.
  6. Start a bash shell inside the container.

This setup is ideal for C++ development, providing a consistent and isolated environment for building and testing C++ applications.

⁠IDE Integration

When running a terminal from an IDE, such as VS Code, you can simply run the command bash in the terminal to get a fully functional Bash shell.

⁠Footnotes

  1. Example of path on Windows: C:\path\on\host ↩⁠

Tag summary

Content type

Image

Digest

sha256:cc91e8fc6…

Size

323.6 MB

Last updated

almost 2 years ago

docker pull theunsp/devenvcontainer-cpp