mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
d76add4d7f
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.
18 lines
380 B
Docker
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"]
|