Sign inSign up

sethsterling/light-cpp

By sethsterling

•Updated 11 months ago

Light-Weight image for C++

Image
Languages & frameworks
Developer tools
Operating systems
0

10K+

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

11 months ago

docker pull sethsterling/light-cpp