From ef36743453e284e347d700aeba5d3dacc6ba3bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Almeida?= Date: Fri, 11 Oct 2019 16:57:50 +0100 Subject: [PATCH] =?UTF-8?q?Added=20Dockerfile=20and=20updated=20README=20f?= =?UTF-8?q?ile=20instructions=20=F0=9F=8E=89=F0=9F=8E=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 14 ++++++++++++++ README.md | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9244a00 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:2 +MAINTAINER André Almeida "andre@andrealmeida.net" + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 5000 + +ENTRYPOINT [ "python" ] +CMD [ "raspberry-pi-web-info/api.py" ] diff --git a/README.md b/README.md index 711945c..46f2ec6 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,9 @@ Install python2.7 - https://www.python.org/download/releases/2.7/ Install pip - https://pip.pypa.io/en/stable/ +(optional) + +Install docker - https://www.docker.com ### Installing @@ -54,6 +57,13 @@ Please, use the following command to install the requirements packages for this pip install -r requirements.txt ``` +if you prefeer, use docker: + +``` +docker build -t raspberry-project . +docker run -p 5000:5000 raspberry-project +``` + ## Deployment