Skip to content

Commit

Permalink
Merge pull request #496 from javabrett/docker-pipenv
Browse files Browse the repository at this point in the history
Dockerfile: Resolve deps using pipenv/Pipefile(.lock)
  • Loading branch information
kennethreitz authored Nov 7, 2018
2 parents 0165e7f + be1413f commit f8ec666
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ LABEL version="0.9.2"
LABEL description="A simple HTTP service."
LABEL org.kennethreitz.vendor="Kenneth Reitz"

RUN apt update -y && apt install python3-pip -y
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

EXPOSE 80
RUN apt update -y && apt install python3-pip git -y && pip3 install --no-cache-dir pipenv

ADD Pipfile Pipfile.lock /httpbin/
WORKDIR /httpbin
RUN /bin/bash -c "pip3 install --no-cache-dir -r <(pipenv lock -r)"

ADD . /httpbin
RUN pip3 install --no-cache-dir /httpbin

RUN pip3 install --no-cache-dir gunicorn /httpbin
EXPOSE 80

CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]

0 comments on commit f8ec666

Please sign in to comment.