-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jon Wayne Parrott
committed
Mar 1, 2016
1 parent
f44dc6a
commit 6cc694e
Showing
5 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM google/python | ||
|
||
RUN if [ "$(which python)" != "/usr/bin/python" ]; then exit 1; fi; | ||
RUN pip install gunicorn | ||
RUN if [ "$(which gunicorn)" != "/usr/local/bin/gunicorn" ]; then exit 1; fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM google/python | ||
|
||
ENV VIRTUAL_ENV /env | ||
ENV PATH /env/bin:$PATH | ||
|
||
RUN if [ "$(which python)" != "/usr/bin/python" ]; then exit 1; fi; | ||
RUN virtualenv /env | ||
# All commands from this point on should use the virtualenv | ||
RUN if [ "$(which python)" != "/env/bin/python" ]; then exit 1; fi; | ||
RUN if [ "$(python --version 2>&1)" != "Python 2.7.9" ]; then exit 1; fi; | ||
RUN if [ "$(which pip)" != "/env/bin/pip" ]; then exit 1; fi; | ||
RUN pip install gunicorn flask | ||
RUN if [ "$(which gunicorn)" != "/env/bin/gunicorn" ]; then exit 1; fi; | ||
RUN python -c "import sys; import flask; sys.exit(0 if flask.__file__.startswith('/env') else 1)" | ||
|
||
# Python 3 | ||
RUN rm -rf /env | ||
RUN if [ "$(which python3.4)" != "/usr/bin/python3.4" ]; then exit 1; fi; | ||
RUN virtualenv -p python3.4 /env | ||
# All commands from this point on should use the virtualenv | ||
RUN if [ "$(which python)" != "/env/bin/python" ]; then exit 1; fi; | ||
RUN if [ "$(which python3)" != "/env/bin/python3" ]; then exit 1; fi; | ||
RUN if [ "$(python --version 2>&1)" != "Python 3.4.2" ]; then exit 1; fi; | ||
RUN if [ "$(which pip)" != "/env/bin/pip" ]; then exit 1; fi; | ||
RUN if [ "$(which pip3)" != "/env/bin/pip3" ]; then exit 1; fi; | ||
RUN pip install gunicorn flask | ||
RUN if [ "$(which gunicorn)" != "/env/bin/gunicorn" ]; then exit 1; fi; | ||
RUN python -c "import sys; import flask; sys.exit(0 if flask.__file__.startswith('/env') else 1)" |