Files
slides-optimized-docker-builds/.docker-files/0-origin.Dockerfile
2023-11-26 23:12:06 +01:00

30 lines
653 B
Docker

# Use Ubuntu 22.04 as the base image
FROM ubuntu
# Copy all source files from the current directory to /app in the image
COPY . .
# 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
# Configuring and building the app using cmake
RUN cmake .
# Building the app using make
RUN make
# Building the app again (if needed)
RUN make install
# Clean up package lists to reduce the image size
RUN rm -rf /var/lib/apt/lists/*
# Setting entry point to the app binary
ENTRYPOINT ["/usr/local/bin/HelloWorldApp"]