Files
httpbin/Dockerfile
T
Andrew Szeto d76add4d7f Change base Dockerfile from Python 2 to Python 3
As @kennethreitz likes to say:

> The use of Python 3 is highly preferred over Python 2. Consider upgrading
> your applications and infrastructure if you find yourself still using Python
> 2 in production today. If you are using Python 3, congratulations — you are
> indeed a person of excellent taste.
2017-09-07 23:37:09 -07:00

18 lines
380 B
Docker

FROM python:3-alpine
ENV WEB_CONCURRENCY=4
ADD . /httpbin
RUN apk add -U ca-certificates libffi libstdc++ && \
apk add --virtual build-deps build-base libffi-dev && \
# Pip
pip install --no-cache-dir gunicorn /httpbin && \
# Cleaning up
apk del build-deps && \
rm -rf /var/cache/apk/*
EXPOSE 8080
CMD ["gunicorn", "-b", "0.0.0.0:8080", "httpbin:app"]