18 lines
		
	
	
		
			585 B
		
	
	
	
		
			Docker
		
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			585 B
		
	
	
	
		
			Docker
		
	
	
	
FROM python:3.7.7-slim-stretch
 | 
						|
ENV PYTHONUNBUFFERED 1
 | 
						|
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
 | 
						|
RUN cat /etc/apt/sources.list
 | 
						|
RUN apt-get update \
 | 
						|
    && apt-get install -y make \
 | 
						|
    && apt-get clean \
 | 
						|
    && rm -rf /var/lib/apt/lists/*
 | 
						|
RUN mkdir -p /app
 | 
						|
WORKDIR /app
 | 
						|
COPY requirements.txt /app
 | 
						|
RUN python -m venv .
 | 
						|
RUN pip install pip==20.1.1
 | 
						|
RUN pip install setuptools==46.1.3
 | 
						|
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
 | 
						|
COPY ./app /app
 | 
						|
EXPOSE 5000
 | 
						|
CMD ["gunicorn", "--bind", ":5000", "server:app"] |