英文:
How to connect to spring boot logs inside docker container
问题
我在远程服务器上的 Docker 容器内运行了一个 Spring Boot Java 应用程序。当我使用 docker-compose up 命令启动它时,我可以看到应用程序的日志。现在我想再次查看它,但不知道如何再次连接到我的应用程序控制台。
我已经通过 "docker exec -it bash" 命令连接到了 Docker 容器终端。但是不知道接下来该怎么做。谢谢你的帮助。
英文:
I have spring boot java application running inside docker container at remote server. When I started it with docker-compose up command, I could see logs of my application. Now I want to see it again, but don't understand how to connect to my application console again.
I have connected to docker container terminal via "docker exec -it bash" command. But have no idea what to do next. Thank you for you help.
答案1
得分: 0
我使用 docker-compose up
命令启动了它。
假设容器仍在运行,您可以使用 docker-compose logs
,如果不是,则需要重新运行 up
。
英文:
> I started it with docker-compose up command
Assuming the contiainer is still running, you would use docker-compose logs
, if not then you need to re-run up
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论