summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJJ Asghar <jj@chef.io>2016-06-02 11:03:12 -0500
committerJJ Asghar <jj@chef.io>2016-06-02 11:03:12 -0500
commit4c320ad883ace7c44f375220223d73e92b992958 (patch)
treea51661cb21b4cb0f2201a0cd11434f27ba31d169
parent6d7de5c2b243cfe16935897d2d5a907f754e9a69 (diff)
Adding DockerfileHEADmaster
- Adds Dockerfile to help deployment - Updated README Change-Id: Ia93a83083a89e9e6ad1a958dc67ac90ef27cae5a
Notes
Notes (review): Code-Review+2: JJ Asghar <jj@chef.io> Workflow+1: JJ Asghar <jj@chef.io> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 02 Jun 2016 19:10:44 +0000 Reviewed-on: https://review.openstack.org/324637 Project: openstack/ailuropoda Branch: refs/heads/master
-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.