1234567891011121314151617181920212223242526 |
- #jdk基础镜像源
- FROM openjdk:8-bullseye
- #设定时区
- ENV TZ=Asia/Shanghai
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- RUN echo "deb http://mirrors.aliyun.com/debian/ buster main non-free contrib" > /etc/apt/sources.list \
- && echo "deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib" >> /etc/apt/sources.list
- RUN apt update && apt install -y curl
- #设置当前目录,没有的话会自动新建
- WORKDIR /data
- #将本地文件复制到容器/data目录
- COPY *.jar /data/
- #暴露服务端口
- EXPOSE 8761
- #设置初始的java启动参数,后续可以在服务启动的环境变量里面覆盖
- #ENV JAVA_OPT="-Xmx1g -Xms1g -Xmn256m -XX:PermSize=512m"
- #java启动命令,可以加参数
- #替换正确的jar包名
- CMD ["sh","-c","java -jar hhface-middleware.jar"]
|