Created
October 29, 2018 20:52
-
-
Save simonw/0ea285e3347b1d06ec5abc1391887739 to your computer and use it in GitHub Desktop.
Lightweight Dockerfile for running a Python 3 webapp under the Zeit 100MB limit
This file contains hidden or 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
FROM alpine:edge | |
RUN apk add --update \ | |
python3 \ | |
python3-dev \ | |
build-base \ | |
&& python3 -m ensurepip \ | |
&& rm -r /usr/lib/python*/ensurepip \ | |
&& pip3 install --upgrade pip setuptools \ | |
&& pip3 install starlette uvicorn \ | |
&& rm -rf /var/cache/apk/* | |
ADD app.py app.py | |
EXPOSE 8009 | |
# Start the server | |
CMD ["python3", "app.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment