-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (32 loc) · 1.43 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM ubuntu:18.04
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN apt-get clean && \
apt-get update -y
# 安装系统 GBK 和 UTF-8 中文语言包
RUN apt-get install -y language-pack-zh-hans language-pack-zh-hans-base \
language-pack-gnome-zh-hans language-pack-gnome-zh-hans-base
RUN apt-get install -y locales && \
echo 'zh_CN.GBK GBK' >> /etc/locale.gen && \
echo 'zh_CN.UTF-8 UTF-8' >> /etc/locale.gen && \
echo "LANG=zh_CN.UTF-8" >> /etc/environment && \
locale-gen
# 安装环境必要工具
RUN apt-get install -y wget openjdk-8-jdk python3 python3-pip tzdata
RUN ln -s /usr/bin/python3 /usr/bin/python && \
python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> /root/.bashrc && \
echo "export JRE_HOME=${JAVA_HOME}/jre" >> /root/.bashrc && \
echo "export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib" >> /root/.bashrc && \
echo "export PATH=${JAVA_HOME}/bin:${PATH}" >> /root/.bashrc
# 安装系统必要工具
RUN apt-get update -y && \
apt-get install -y curl rsyslog nginx apache2-utils openssh-server rsyslog
# 安装 flask 日志服务器
ADD ./py /app/py
RUN python -m pip install -r /app/py/requirements.txt
WORKDIR /
ADD ./nginx/bin /bin
RUN chmod 100 /bin/.docker-entrypoint.sh && \
chmod 100 /bin/.wrapper.sh
ENTRYPOINT [ "/bin/.wrapper.sh" ]