From fe18f027ae23542dc0976cabf29d7b396924a1c9 Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Tue, 16 Sep 2014 16:35:57 -0600 Subject: [PATCH] Changed python documentation to use the onbuild example, similar to the ruby example. --- python/README-content.md | 10 ++++------ python/README.md | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/python/README-content.md b/python/README-content.md index 2833b8b94..86000c3f2 100644 --- a/python/README-content.md +++ b/python/README-content.md @@ -15,18 +15,16 @@ Windows 2000 and later. ## Create a `Dockerfile` in your Python app project - FROM python:3 - COPY . /usr/src/myapp - WORKDIR /usr/src/myapp + FROM python:3-onbuild CMD [ "python", "./your-daemon-or-script.py" ] or (if you need to use Python 2): - FROM python:2 - COPY . /usr/src/myapp - WORKDIR /usr/src/myapp + FROM python:2-onbuild CMD [ "python", "./your-daemon-or-script.py" ] +These images include multiple `ONBUILD` triggers which should be all you need to bootstrap most applications. The build will `COPY` a `requirements.txt` file, `RUN pip install` on said file, and then copy the current directory into `/usr/src/app`. + You can then build and run the Docker image: docker build -t my-python-app diff --git a/python/README.md b/python/README.md index 2e011ee63..980aa40f5 100644 --- a/python/README.md +++ b/python/README.md @@ -22,18 +22,16 @@ Windows 2000 and later. ## Create a `Dockerfile` in your Python app project - FROM python:3 - COPY . /usr/src/myapp - WORKDIR /usr/src/myapp + FROM python:3-onbuild CMD [ "python", "./your-daemon-or-script.py" ] or (if you need to use Python 2): - FROM python:2 - COPY . /usr/src/myapp - WORKDIR /usr/src/myapp + FROM python:2-onbuild CMD [ "python", "./your-daemon-or-script.py" ] +These images include multiple `ONBUILD` triggers which should be all you need to bootstrap most applications. The build will `COPY` a `requirements.txt` file, `RUN pip install` on said file, and then copy the current directory into `/usr/src/app`. + You can then build and run the Docker image: docker build -t my-python-app