summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile25
-rw-r--r--README.md19
2 files changed, 42 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..21fc114
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
1# Dockerfile for ailuropoda
2# Created 2016-06-02
3# Author: JJ Asghar <jj@chef.io>
4#
5
6# Pull down a standard python container
7FROM python:2.7.11-alpine
8
9# Create the place for the application
10RUN mkdir -p /usr/src/app
11
12# Do your work in that place
13WORKDIR /usr/src/app
14
15# Copy the requirements.txt to get dependencies
16COPY requirements.txt /usr/src/app/
17
18# Get the dependencies
19RUN pip install -v -r requirements.txt
20
21# Copy the file into the working directory
22COPY . /usr/src/app
23
24# Make the pandas cry
25CMD [ "python", "./main.py" ]
diff --git a/README.md b/README.md
index 9550d1b..4f90d47 100644
--- a/README.md
+++ b/README.md
@@ -2,5 +2,20 @@
2 2
3This project is to create a "sad panda" api. 3This project is to create a "sad panda" api.
4 4
5- v1 will give you back a jpg of a sad panda from a list. 5- v1 will give you back a jpg of a sad panda at location: http://localhost:1901/v1/sad_panda01.png
6- v2 we are planning for a random "sad panda" image 6
7## Deployment
8
9### Dockerfile
10
11For your convenience there is [Dockerfile](./Dockerfile) located in this directory.
12You can start up this application assuming you have Docker installed via:
13
14```bash
15$ docker build -t sadpanda .
16$ docker run -it -p 1901:1901 --rm --name sadpanda sadpanda
17```
18
19This will give you a Docker container named sadpanda and start it on port `1901`.
20
21Go to: http://DOCKERHOST:1901/v1/sad_panda01.png to see the image.