mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-31 22:21:13 +02:00
Implemented Docker support
This commit is contained in:
parent
ed4ff7833a
commit
9e730456bb
1 changed files with 25 additions and 0 deletions
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
FROM gcc:9.2
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
# Installing Dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
wget \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Installing CMake
|
||||||
|
RUN wget "https://github.com/Kitware/CMake/releases/download/v3.18.3/cmake-3.18.3-Linux-x86_64.sh" \
|
||||||
|
&& chmod a+x cmake-3.18.3-Linux-x86_64.sh \
|
||||||
|
&& ./cmake-3.18.3-Linux-x86_64.sh --prefix=/usr/local --skip-license \
|
||||||
|
&& rm cmake-3.18.3-Linux-x86_64.sh
|
||||||
|
|
||||||
|
# Copying files
|
||||||
|
COPY . /app
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Building
|
||||||
|
RUN cmake -Hall -Bbuild \
|
||||||
|
&& cmake --build build
|
||||||
|
|
||||||
|
# Running
|
||||||
|
CMD [ "./build/standalone/Greeter" ]
|
Loading…
Add table
Add a link
Reference in a new issue