# # Copyright (C) 2018 Xuetong Tech Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # FROM ubuntu:16.04 MAINTAINER xt WORKDIR /var/app ENV PATH /opt/conda/bin:$PATH COPY sources.list /etc/apt/sources.list COPY requirements.txt ./ COPY Miniconda3-latest-Linux-x86_64.sh ./ RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 \ && apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 \ && apt-get update \ && apt-get install bzip2 gcc libmysqlclient-dev -y \ && rm -rf /var/lib/apt/lists/* \ && sh ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda \ && rm ./Miniconda3-latest-Linux-x86_64.sh \ && conda install pip \ && pip install --no-cache-dir --trusted-host mirrors.aliyun.com \ -i http://mirrors.aliyun.com/pypi/simple -r requirements.txt ENV TZ Asia/Shanghai CMD [ "python3", "/usr/local/app/startup.py" ]