From 17bc70407e715c36acd8b1f5a6dc0f3e0197c018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique=20Ivanchechen?= Date: Wed, 29 Jan 2020 16:50:23 -0300 Subject: [PATCH 1/2] add Dockerfile --- .dockerignore | 2 ++ Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..508eb1d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git/ +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f7c772 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:latest + +RUN apt-get update +RUN apt-get upgrade -y +RUN apt-get install python2.7 -y +RUN apt-get install python-pip -y +RUN apt-get install python3 -y +RUN apt-get install python3-pip -y + +# run two quick checks +RUN python2 +RUN python3 + +WORKDIR /calculator +COPY * ./ +RUN pip install . +# doesn't work +# RUN pip3 install . + +ENTRYPOINT [ "python", "my_first_calculator.py" ] \ No newline at end of file From 53035740e43669b62d2351c1f36000ac3f30702b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique=20Ivanchechen?= Date: Wed, 29 Jan 2020 17:22:43 -0300 Subject: [PATCH 2/2] optimization --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f7c772..4b349d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,14 +7,11 @@ RUN apt-get install python-pip -y RUN apt-get install python3 -y RUN apt-get install python3-pip -y -# run two quick checks RUN python2 RUN python3 WORKDIR /calculator COPY * ./ RUN pip install . -# doesn't work -# RUN pip3 install . -ENTRYPOINT [ "python", "my_first_calculator.py" ] \ No newline at end of file +ENTRYPOINT ["python", "my_first_calculator.py"] \ No newline at end of file