-
Notifications
You must be signed in to change notification settings - Fork 62
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
Showing
26 changed files
with
218 additions
and
326 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,27 +1,17 @@ | ||
FROM python:3.6 as builder | ||
MAINTAINER code@ocado.com | ||
|
||
RUN pip install pipenv | ||
COPY ["Pipfile", "Pipfile.lock", "setup.py", "./"] | ||
RUN pipenv install coverage | ||
RUN pipenv install --system --deploy | ||
|
||
FROM python:3.6-alpine as base | ||
COPY --from=builder /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages | ||
COPY . . | ||
|
||
FROM base as runner | ||
RUN apk add --no-cache bash | ||
ENV WORKER_MANAGER=kubernetes | ||
CMD python ./service.py 0.0.0.0 | ||
|
||
FROM base as tester | ||
ENV WORKER_MANAGER=kubernetes | ||
CMD python setup.py test | ||
|
||
FROM base as coverage_tester | ||
FROM base as runner | ||
ENV WORKER_MANAGER=kubernetes | ||
ENV WITH_COVERAGE='True' | ||
RUN apk add bash | ||
COPY --from=builder /usr/local/bin/coverage /usr/local/bin/coverage | ||
CMD python setup.py test | ||
CMD python ./service.py 0.0.0.0 5000 |
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
Oops, something went wrong.