docker-compose启动springboo应用
2021-05-01 04:28
标签:java_opts nbsp time jar spring app boot start volumes Dockerfile文件: docker-compose.yml文件: 启动springboot应用: docker-compose启动springboo应用 标签:java_opts nbsp time jar spring app boot start volumes 原文地址:https://www.cnblogs.com/zhi-leaf/p/13220884.htmlFROM openjdk:8-jdk
ADD ./myweb.jar app.jar
EXPOSE 701
ENTRYPOINT ["java","-jar","app.jar"]
version: "3"
services:
myweb:
build:
context: .
dockerfile: Dockerfile
image: myweb:1.0.0
container_name: springboot-mybatis
ports:
- "701:701"
volumes:
- /etc/localtime:/etc/localtime
- $PWD/logs:/logs
restart: always
environment:
- JAVA_OPTS=-Xmx256M
- spring.profiles.active=test
docker-compose up
文章标题:docker-compose启动springboo应用
文章链接:http://soscw.com/index.php/essay/80704.html