-
Notifications
You must be signed in to change notification settings - Fork 108
/
Dockerfile-hipy-server
20 lines (18 loc) · 1.01 KB
/
Dockerfile-hipy-server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.8-slim
# 添加描述信息
MAINTAINER hipy-server
WORKDIR /home/hipy/hipy_server/app
COPY ./hipy-server/app .
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
RUN apt-get update && apt-get install -y python3-psycopg2 gcc python3-dev g++ default-jdk supervisor libpq-dev
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install --upgrade pip && pip install --upgrade setuptools && pip install --no-cache-dir -r /home/hipy_server/app/requirements.txt
RUN pip install click pydantic virtualenv
# RUN pip install --extra-index-url https://nightly.pythonmonkey.io/ --pre pythonmonkey --no-dependencies
# 切换容器时区
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
# 设置语言支持中文打印
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
#EXPOSE 5707 5708
CMD ["python3", "./main.py"]
#docker run -d -it --name hipy -p 5707:5707 -v /home/hipy/hipy_server:/home/hipy/hipy_server python:3.8-slim