FROM ubuntu # Setting entry point to the app binary ENTRYPOINT ["/usr/local/bin/HelloWorldApp"] # Update package list to ensure we have the latest information RUN apt-get update # Install g++ RUN apt-get install -y g++ # Install cmake to manage the build process RUN apt-get install -y cmake # Clean up package lists to reduce the image size RUN rm -rf /var/lib/apt/lists/* # Copy all source files from the current directory to /app in the image COPY . . # Configuring and building the app using cmake RUN cmake . # Building the app using make RUN make # Install the app RUN make install