init
This commit is contained in:
29
.docker-files/0-origin.Dockerfile
Normal file
29
.docker-files/0-origin.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user