17 lines
766 B
Docker
17 lines
766 B
Docker
#指定了基础镜像为 khipu/openjdk17-alpine,即使用了 OpenJDK 17 的 Alpine 版本作为基础
|
||
FROM khipu/openjdk17-alpine
|
||
#设置了一个名为 SERVIECE_PORT 的环境变量,并将其值设为 9090
|
||
ENV SERVIECE_PORT = 9090
|
||
# 容器里 新建目录 thirdPlatform
|
||
RUN mkdir -p /thirdPlatform/
|
||
# 工作区
|
||
WORKDIR /thirdPlatform
|
||
# 复制操作
|
||
COPY ./start.sh /thirdPlatform/
|
||
#将宿主机当前目录下的 *.jar 文件复制到容器的 /third_platform_admin/ 目录下
|
||
COPY ./*.jar /thirdPlatform/
|
||
#对 /thirdPlatform/ 目录及其子目录下的所有文件赋予可执行权限
|
||
RUN chmod 755 -R /thirdPlatform/
|
||
#设置容器的入口点为 /third_platform_admin/start.sh,即在容器启动时执行该脚本
|
||
ENTRYPOINT ["/thirdPlatform/start.sh"]
|