We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4db575e commit b5505ceCopy full SHA for b5505ce
CMakeLists.txt
@@ -0,0 +1,7 @@
1
+cmake_minimum_required(VERSION 3.9)
2
+project(hello_docker)
3
+
4
+set(CMAKE_CXX_STANDARD 14)
5
+set(SOURCE_FILES hello.cpp)
6
7
+add_executable(testdocker_run ${SOURCE_FILES})
Dockerfile
@@ -0,0 +1,16 @@
+FROM ubuntu:latest
+ARG DEBIAN_FRONTED=noninteractive
+RUN apt-get -y update && apt-get install -y
+RUN apt-get -y install g++ cmake git
8
+COPY . .
9
10
+WORKDIR .
11
12
+RUN mkdir ./build
13
+RUN cmake -B/build -S . -D CMAKE_BUILD_TYPE=Release
14
+RUN cmake --build /build
15
16
+CMD ["./build/testdocker_run"]
hello
8.71 KB
hello.cpp
+#include<iostream>
+using namespace std;
+int main(void)
+{
+ cout<<"hello world"<<endl;
+}
0 commit comments