Docker file
cpp_dev.dockerfile
FROM debian:latest # Set non-interactive mode to avoid prompts during installation ENV DEBIAN_FRONTEND=noninteractive # Install necessary packages RUN apt-get update && apt-get install -y git cmake make g++ gdb # Set working directory WORKDIR /workspace # Default command to keep the container running CMD ["/bin/bash"]
Docker image
console
$ docker buildx build -t "cpp-dev" -f "cpp_dev.dockerfile" . $ docker run -it --rm -v "$(pwd):/workspace" cpp-dev