Thanks to visit codestin.com
Credit goes to hub.docker.com

sethsterling/light-cpp

By sethsterling

Updated 8 months ago

Light-Weight image for C++

Image
Languages & frameworks
Developer tools
Operating systems
0

180

sethsterling/light-cpp repository overview

Alpine Linux container with C++ integrated and configured

sethsterling/light-cpp

With this image the process to compile and install C++ is easier and maintain your environment as clean as possible.

Acknowledgement to: Alpine - Base_Image - C++ Tutorial

Docker Pulls - Docker Image Size (latest by date)


1. Pull and Run

Pull Image:
sudo docker pull sethsterling/light-cpp
Run Container:
sudo docker run -it --rm -v $PWD:/workspace sethsterling/light-cpp
Compile Program:
g++ {your_program_name}.cpp -o {your_executable_name} 
Run Program:
./{your_executable_name}

2. Build by your Own

Dockerfile:
# Light-Weight Docker image for C++
FROM alpine:3.18

WORKDIR /workspace

# Install packages removing cache
RUN apk update && \
    apk add --no-cache build-base && \
    rm -rf /var/cache/apk/*

CMD ["/bin/sh"]

Build Container:
sudo docker build -t light-cpp .
Run Container with program volume:
sudo docker run -it --rm -v $PWD:/workspace sethsterling/light-cpp

Tag summary

Content type

Image

Digest

sha256:6ec6bb556

Size

82.9 MB

Last updated

8 months ago

docker pull sethsterling/light-cpp