Skip to content

Designed to automate and unify docker image setup for my CS 3505 class at the University of Utah. Scripts are designed for MacOS, Windows, and Linux enviroments. The scripts will automatically create the nessesary file structure needed for a persistent volumn that docker can then use for saving of course work. The script will automatically creat

License

Notifications You must be signed in to change notification settings

FouL06/Cpp-Development-Docker-Container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Development Docker Container

Automated Docker environment setup for C++ development with cross-platform support. Originally created for CS 3505 at the University of Utah, this tool provides a consistent development environment across macOS, Windows, and Linux.

Features

  • Automated Setup: One-script installation creates necessary file structure and Docker configuration
  • Persistent Storage: Automatic volume mounting for saving coursework between sessions
  • Complete Toolchain: Pre-configured with make, gcc, gdb, git, vim/nano, and bash-completion
  • Cross-Platform: Works seamlessly on macOS, Windows (via WSL), and Linux
  • VSCode Integration: Built-in Remote-Containers support for streamlined development

Prerequisites

All Platforms

Windows Only

Note: The setup.ps1 script will install WSL automatically, but you must enable CPU virtualization in your BIOS first.

Installation

Windows

  1. Install Docker Desktop, VSCode, and Remote-Containers extension
  2. Enable CPU virtualization in BIOS settings
  3. Run the setup script in PowerShell:
    .\setup.ps1
  4. VSCode will launch automatically. Press F1 and run:
    Remote-Containers: Open Configuration File...
    
  5. Select From 'Dockerfile'
  6. Click "Reopen in Container" when prompted

macOS

  1. Install Docker Desktop, VSCode, and Remote-Containers extension
  2. Make the setup script executable:
    chmod +x setup.sh
  3. Run the setup script:
    ./setup.sh
  4. VSCode will launch automatically. Press F1 and run:
    Remote-Containers: Open Configuration File...
    
  5. Select From 'Dockerfile'
  6. Click "Reopen in Container" when prompted

Linux

  1. Install Docker Desktop (if necessary), VSCode, and Remote-Containers extension
  2. Make the setup script executable:
    chmod +x setup.sh
  3. Run the setup script:
    ./setup.sh
  4. VSCode will launch automatically. Press F1 and run:
    Remote-Containers: Open Configuration File...
    
  5. Select From 'Dockerfile'
  6. Click "Reopen in Container" when prompted

Verification

To confirm you're working inside the Docker container, open a terminal in VSCode. You should see:

root@<container-id>

Working with the Container

File Persistence

The setup script creates an assignments folder at:

  • Windows: Documents\DockerImages\assignments
  • macOS/Linux: ~/Documents/DockerImages/assignments

All files saved in this folder persist between container sessions.

Reopening the Container

  1. Open the assignments folder in VSCode
  2. Press F1 and run: Remote-Containers: Open Configuration File...
  3. Select From 'Dockerfile'
  4. Verify you're in the container by checking the terminal prompt

Important Notes

⚠️ Do not modify the Dockerfile or .devcontainer folder contents
Always save work inside the assignments folder for persistence
🔍 Verify container status by checking the terminal prompt shows root@<container-id>

Included Development Tools

  • Compiler: GCC
  • Debugger: GDB
  • Build System: Make
  • Version Control: Git
  • Editors: Vim, Nano
  • Shell: Bash with completion support

Topics

linux docker cpp vscode dockerfile docker-image shell-scripts


Happy Coding! 🚀

About

Designed to automate and unify docker image setup for my CS 3505 class at the University of Utah. Scripts are designed for MacOS, Windows, and Linux enviroments. The scripts will automatically create the nessesary file structure needed for a persistent volumn that docker can then use for saving of course work. The script will automatically creat

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published