I have a Spring-Boot application that I have running in a Docker container. When I run the app standalone outside of the container, all the logs are written to stdout
. I need to get the app stdout
written to a file on my Docker container.
My docker-compose file looks like this:
version: "3.3"
services:
meanwhileinhell:
image: azul/zulu-openjdk-centos:latest
container_name: "meanwhile-in-hell"
restart: always
volumes:
- logfiles:/var/log/meanwhileinhell/
ports:
- 8091:8091
networks:
- default
volumes:
logfiles:
driver: local
networks:
default:
external:
name: meanwhileinhell-network
I can get the directory specified to be created ok, but there is nothing in it. Can someone help me as to how to get this to write to file? I haven't been able to find anything on SO or general searching. docker logs -f <container-id>
shows the same information I am looking to write.