From 7574c7592168c71521838b6afb25fa34882b7cba Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sat, 29 Feb 2020 22:44:08 +0000 Subject: [PATCH] adding Dockerfile and Readme --- README.md | 27 +++++++++++++++++++++++++++ src/Dockerfile | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 README.md create mode 100644 src/Dockerfile diff --git a/README.md b/README.md new file mode 100644 index 0000000..6defd48 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# DockerPythonFlask + +This is a dockerized version of a Python3 Flask Server. + +## Environment-variables + +There are no environment variables that get opened up. + +## Volumes + +Set the following volumes with the -v tag. + +| Volume-Name | Container mount | Description | +| ----------- | --------------- | ----------- | +| app | /flask/app | directory for flask application | + +## Ports + +Set the following volumes with the -p tag. + +| Container-Port | Recommed outside port | Protocol | Description | +| -------------- | --------------------- | -------- | ----------- | +| 5000 | 80 | TCP | HTTP port | + +## Example run-command + +``` docker run --name flask -v flask:/flask/app --restart unless-stopped -d -p 80:5000 tiynger/pythonflask ``` diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 0000000..54d4048 --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu + +MAINTAINER TiynGER mail@martenkante.eu + +RUN apt-get update + +RUN apt-get install python3 python3-pip -y + +RUN pip3 install flask + +WORKDIR /flask + +VOLUME /flask + +EXPOSE 5000 + +ENTRYPOINT [ "python3" ] + +CMD [ "app.py" ]