FROM debian:bullseye
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone && mkdir -p /opt
ADD chromedriver /opt/chromedriver
RUN chmod +x /opt/chromedriver
ADD OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz /opt
ENV JAVA_HOME /opt/jdk8u352-b08
ENV PATH PATH $PATH:$JAVA_HOME/bin
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && apt-get update -y && apt-get install chromium -y && chromium -version && apt-get install ttf-wqy-microhei ttf-wqy-zenhei -y
CMD ["bash"]
2 、java 镜像
FROM harbor.******.com/library/temurin-jdk8-selenium:109.0.5414.74
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
ADD target/moose-custom-api.jar /data/java/
WORKDIR /data/java/
RUN echo '' > application.yml
ENTRYPOINT ["java", "-jar", "moose-custom-api.jar", "--spring.config.location=application.yml"]
3 、僵尸进程
4 、措施(无用)
try {
...
} finally {
// exit
driver.close();
driver.quit();
}