소스 검색

:sparkle: Added a first version of Dockerfile

Guillaume Jacquenot 5 년 전
부모
커밋
d7839cc475
1개의 변경된 파일27개의 추가작업 그리고 0개의 파일을 삭제
  1. 27 0
      Dockerfile

+ 27 - 0
Dockerfile

@@ -0,0 +1,27 @@
+FROM debian:10 AS builder
+RUN apt-get update \
+ && apt-get install --yes --no-install-recommends \
+    g++ \
+    libpython3-dev \
+    make \
+    python3 \
+    python3-dev \
+    python3-numpy
+
+ADD Makefile matplotlibcpp.h numpy_flags.py /opt/
+ADD examples/*.cpp /opt/examples/
+RUN cd /opt \
+ && make PYTHON_BIN=python3 \
+ && ls examples/build
+
+FROM debian:10
+RUN apt-get update \
+ && apt-get install --yes --no-install-recommends \
+    libpython3-dev \
+    python3-matplotlib \
+    python3-numpy
+
+COPY --from=builder /opt/examples/build /opt/
+RUN cd /opt \
+ && ls \
+ && ./basic