init
This commit is contained in:
20
.docker-files/3-mounting.Dockerfile
Normal file
20
.docker-files/3-mounting.Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM ubuntu
|
||||
|
||||
# Setting entry point to the app binary
|
||||
ENTRYPOINT ["/usr/local/bin/HelloWorldApp"]
|
||||
|
||||
# Install cmake to manage the build process. Removing cache by `docker builder prune`
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends g++ make cmake
|
||||
|
||||
# Copy all source files from the current directory to /app in the image
|
||||
COPY CMakeLists.txt .
|
||||
COPY src ./src
|
||||
|
||||
# Configuring, building and install the app
|
||||
RUN cmake . \
|
||||
&& make \
|
||||
&& make install
|
||||
Reference in New Issue
Block a user