FROM debian11_py3.9.13_gdal3.4.3_small:1.0.0 COPY ./requirements.txt /tmp/ COPY ./conf/bootstrap.sh /opt/bootstrap.sh COPY ./conf/supervisord.conf /etc/ COPY ./conf/supervisor.conf /etc/supervisord.d/supervisor.conf RUN apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y \ supervisor \ gcc g++ \ vim net-tools \ curl \ apt-utils \ && pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip setuptools \ && pip install \ --index-url https://pypi.tuna.tsinghua.edu.cn/simple \ -r /tmp/requirements.txt \ # 默认是128,当server处理请求较慢,以至于socket监听队列被填满后,新来的请求会被拒绝。 && mkdir /opt/init \ && echo "echo 2048 > /proc/sys/net/core/somaxconn" > /opt/init/sysctl.sh \ && chmod +x /opt/bootstrap.sh \ # 清理和删除工作 && apt-get autoremove -y \ && apt-get autoclean -y \ && apt-get clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete \ && find /var/log -type f | while read f; do echo -n '' > ${f}; done \ && rm -rf /var/lib/apt/lists/* \ && rm -rf ~/.cache/pip/* ENTRYPOINT ["/opt/bootstrap.sh"] EXPOSE 5000