首先保证springboot与各种jar包文件夹在同一目录
dockerfile如下内容
FROM frolvlad/alpine-oraclejdk8
VOLUME /usr/cloud
ADD lib /lib/
ADD lib_attachment /lib_attachment/
ADD lib_bigdata /lib_bigdata/
ADD lib_bpm /lib_bpm/
ADD lib_deploy /lib_deploy/
ADD lib_elasticsearch /lib_elasticsearch/
ADD lib_exchange /lib_exchange/
ADD lib_hqpurchase_manager /lib_hqpurchase_manager/
ADD lib_messaging /lib_messaging/
ADD lib_oracle /lib_oracle/
ADD lib_purchase_project /lib_purchase_project/
ADD lib_quartz /lib_quartz/
ADD lib_rabbitmq /lib_rabbitmq/
ADD lib_redis /lib_redis/
ADD lib_rfc /lib_rfc/
ADD api-masterdata-service-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 40121
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dloader.path=/lib_oracle,/lib,/lib_redis,/lib_rabbitmq,/lib_elasticsearch","-jar","/app.jar","--server.port=40121","--spring.profiles.active=local"]
执行如下命令
docker build -t registry.cn-beijing.aliyuncs.com/ibmscmcloud/api-masterdata-service:0.0.1 .
docker push registry.cn-beijing.aliyuncs.com/ibmscmcloud/api-masterdata-service:0.0.1