add docker
This commit is contained in:
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
wfc-license-serve:
|
||||
# 使用前面创建的Dockerfile构建的镜像
|
||||
build: .
|
||||
# 指定容器名(可选)
|
||||
container_name: wfc-license-serve
|
||||
# 指定端口映射(例如,将容器的8080端口映射到主机的8080端口)
|
||||
ports:
|
||||
- "8070:8070"
|
||||
volumes:
|
||||
- ./license:/opt/license
|
||||
15
dockerfile
Normal file
15
dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY target/wfc-license-serve-1.0.0.jar /opt/wfc/wfc-license-serve.jar
|
||||
# 启动licese-serve服务
|
||||
ENTRYPOINT ["java","-jar","wfc-license-serve.jar"]
|
||||
@@ -1,4 +1,4 @@
|
||||
server.port=8081
|
||||
server.port=8070
|
||||
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Źػ<C5B9>
|
||||
server.shutdown=graceful
|
||||
|
||||
Reference in New Issue
Block a user