Mall的相关文件
[root@rabbitmq1 mall]# ls
application-dev.yml application.yml Dockerfile mall-admin-1.0-SNAPSHOT.jar
Dockfile
FROM openjdk:8u222-jre
WORKDIR /usr/local/mall
ADD mall-admin-1.0-SNAPSHOT.jar .
ADD application.yml .
ADD application-dev.yml .
EXPOSE 8080
CMD ["java","-jar","mall-admin-1.0-SNAPSHOT.jar"]
构建mall镜像
[root@rabbitmq1 mall]# docker build -t malladmin .
启动mall实例
[root@rabbitmq1 mall]# docker run -d -p 9000:8080 malladmin
访问mall程序