Skip to content

Commit 38156aa

Browse files
committed
Added Dockerfile for demo_app.
1 parent b652e27 commit 38156aa

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Dockerfile
2+
.git

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM python:3.6
2+
3+
ADD . /flasgger
4+
WORKDIR /flasgger
5+
6+
RUN pip3 install -U --no-cache-dir pip && \
7+
pip3 install --no-cache-dir -r requirements.txt -r requirements-dev.txt && \
8+
pip3 install --no-cache-dir etc/flasgger_package
9+
10+
EXPOSE 5000
11+
12+
CMD ["python3", "demo_app/app.py"]

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ There are some [example applications](examples/) and you can also play with exam
2828

2929
> NOTE: all the examples apps are also test cases and run automatically in Travis CI to ensure quality and coverage.
3030
31+
## Docker
32+
33+
The examples and demo app can also be built and run as a Docker image/container:
34+
35+
```
36+
docker build -t flasgger .
37+
docker run -it --rm -p 5000:5000 --name flasgger flasgger
38+
```
39+
Then access the Flasgger demo app at http://localhost:5000 .
40+
3141
# Installation
3242

3343
> under your virtualenv do:

0 commit comments

Comments
 (0)