|
1 | 1 | Example Dockerfile App |
2 | 2 | ====================== |
3 | 3 |
|
4 | | -This sample application shows how you can deploy Dockerfile-based |
5 | | -applications to Deis. |
| 4 | +A sample dockerfile which runs python http server inside a container. If required we can create a seperate python script to run inside the container to do something more complicated than display a http page. |
6 | 5 |
|
7 | 6 | ## Usage |
8 | 7 |
|
9 | | -``` |
10 | | -$ deis create |
11 | | -Creating application... done, created valued-yearbook |
12 | | -Git remote deis added |
13 | | -$ git push deis master |
14 | | -Counting objects: 35, done. |
15 | | -Delta compression using up to 8 threads. |
16 | | -Compressing objects: 100% (26/26), done. |
17 | | -Writing objects: 100% (35/35), 4.55 KiB | 0 bytes/s, done. |
18 | | -Total 35 (delta 8), reused 31 (delta 7) |
19 | | ------> Building Docker image |
20 | | -Uploading context 5.632 kB |
21 | | -Uploading context |
22 | | -Step 0 : FROM centos:latest |
23 | | - ---> 0b443ba03958 |
24 | | -Step 1 : ADD . /app |
25 | | - ---> 8a2ae43bfb50 |
26 | | -Removing intermediate container 53693bf203de |
27 | | -Step 2 : WORKDIR /app |
28 | | - ---> Running in a7740ec48b5d |
29 | | - ---> cd97e9d93eca |
30 | | -Removing intermediate container a7740ec48b5d |
31 | | -Step 3 : CMD python -m SimpleHTTPServer 5000 |
32 | | - ---> Running in 5423a06c280d |
33 | | - ---> ad92d46a2f46 |
34 | | -Removing intermediate container 5423a06c280d |
35 | | -Step 4 : EXPOSE 5000 |
36 | | - ---> Running in f85ca4c16fbc |
37 | | - ---> 38d5c240ce7f |
38 | | -Removing intermediate container f85ca4c16fbc |
39 | | -Successfully built 38d5c240ce7f |
40 | | ------> Pushing image to private registry |
| 8 | +docker build -t sample . |
| 9 | +docker run -p 5000:5000 sample |
41 | 10 |
|
42 | | - Launching... done, v2 |
43 | 11 |
|
44 | | ------> valued-yearbook deployed to Deis |
45 | | - http://valued-yearbook.local.deisapp.com |
46 | 12 |
|
47 | | - To learn more, use `deis help` or visit http://deis.io |
48 | 13 |
|
49 | | -To ssh://[email protected]:2222/valued-yearbook.git |
50 | | - * [new branch] master -> master |
51 | | -$ curl http://valued-yearbook.local.deisapp.com/ |
52 | | -<h1>Powered by Deis</h1> |
53 | | -``` |
54 | | - |
55 | | -## Additional Resources |
56 | | - |
57 | | -* [Get Deis](http://deis.io/get-deis/) |
58 | | -* [GitHub Project](https://github.com/deis/deis) |
59 | | -* [Documentation](http://docs.deis.io/) |
60 | | -* [Blog](http://deis.io/blog/) |
0 commit comments