This repository provides a simple setup to compile and run C++ programs using Docker.
- Docker installed on your machine
-
Clone the repository:
git clone https://github.com/saqibbedar/cpp-docker-runner.git cd run-cpp-using-docker
-
Build the Docker image:
docker build -t cpp-docker .
-
Run your C++ program:
docker run --rm -it cpp-docker
To pull the image from Docker Hub, use the following command:
docker pull saqibbedar/cpp-docker-runner:latest
To run the container and execute the C++ program, use the following command:
docker run -it --rm saqibbedar/cpp-docker-runner:latest
Dockerfile
: Contains the instructions to build the Docker image.main.cpp
: Sample C++ program.
This project is licensed under the MIT License - see the LICENSE file for details.