Last active
May 23, 2018 15:07
-
-
Save shau-lok/fb44e01e8f16986ad1b98e16fbb121e9 to your computer and use it in GitHub Desktop.
Dockerfile - flask
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 python:3.6.5-slim | |
MAINTAINER shau-lok | |
RUN sed -i 's#http://archive.ubuntu.com#http://mirrors.163.com#g' /etc/apt/sources.list | |
RUN sed -i 's#http://deb.debian.org#http://mirrors.163.com#g' /etc/apt/sources.list | |
RUN sed -i 's#http://security-cdn.debian.org#http://mirrors.163.com#g' /etc/apt/sources.list | |
RUN sed -i 's#http://security.debian.org#http://mirrors.163.com#g' /etc/apt/sources.list | |
RUN apt-get update \ | |
&& apt-get -yq install python-dev libmysqlclient-dev \ | |
libicu-dev apt-utils gcc curl wget vim netbase \ | |
&& apt-get clean all | |
WORKDIR /app | |
ADD . /app | |
# environments | |
ENV FLASK_APP apps.api | |
ENV FLASK_ENV local | |
# celery for root user | |
ENV C_FORCE_ROOT true | |
RUN pip install -r requirements.txt -i https://pypi.douban.com/simple/ | |
RUN cp deploy/.env.example .env | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment