Browse Source

adding Dockerfile and Readme

master
TiynGER 10 months ago
commit
7574c75921
2 changed files with 46 additions and 0 deletions
  1. +27
    -0
      README.md
  2. +19
    -0
      src/Dockerfile

+ 27
- 0
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 ```

+ 19
- 0
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" ]

Loading…
Cancel
Save