diff --git a/cli.html b/cli.html index 2508d5e4..be10a90a 100644 --- a/cli.html +++ b/cli.html @@ -6,7 +6,7 @@ - +
flask
redis
And we define how to build this into a Docker image using a file called Dockerfile:
FROM stackbrew/ubuntu:13.10
-RUN apt-get -qq update
-RUN apt-get install -y python python-pip
+Next, we want to create a Docker image containing all of our app's dependencies. We specify how to build one using a file called Dockerfile:
+FROM orchardup/python:2.7
ADD . /code
WORKDIR /code
RUN pip install -r requirements.txt
-EXPOSE 5000
-CMD python app.py
-That tells Docker to create an image with Python and Flask installed on it, run the command python app.py, and open port 5000 (the port that Flask listens on).
+This tells Docker to install Python, our code and our Python dependencies inside a Docker image. For more information on how to write Dockerfiles, see the Dockerfile tutorial and the Dockerfile reference.
We then define a set of services using fig.yml:
web:
build: .
+ command: python app.py
ports:
- 5000:5000
volumes:
@@ -122,7 +119,7 @@ redis:
This defines two services:
-web, which is built from Dockerfile in the current directory. It also says to forward the exposed port 5000 on the container to port 5000 on the host machine, connect up the Redis service, and mount the current directory inside the container so we can work on code without having to rebuild the image.
+web, which is built from Dockerfile in the current directory. It also says to run the command python app.py inside the image, forward the exposed port 5000 on the container to port 5000 on the host machine, connect up the Redis service, and mount the current directory inside the container so we can work on code without having to rebuild the image.
redis, which uses the public image orchardup/redis.
diff --git a/install.html b/install.html
index a9db48db..2eb74cd7 100644
--- a/install.html
+++ b/install.html
@@ -6,7 +6,7 @@
-
+
diff --git a/rails.html b/rails.html
index bc19f36e..fee78df9 100644
--- a/rails.html
+++ b/rails.html
@@ -6,7 +6,7 @@
-
+
diff --git a/wordpress.html b/wordpress.html
index ffdbb09f..e1de676a 100644
--- a/wordpress.html
+++ b/wordpress.html
@@ -6,7 +6,7 @@
-
+
diff --git a/yml.html b/yml.html
index 25b29d8f..5d7cefdc 100644
--- a/yml.html
+++ b/yml.html
@@ -6,7 +6,7 @@
-
+