Can I issue a RUN mkdir command in the Dockerfile to create a folder with the container ID as its name?
Looking for something like: /prod/logs/CONTAINERID/app.log
Share and learn in the Docker community.
Can I issue a RUN mkdir command in the Dockerfile to create a folder with the container ID as its name?
Looking for something like: /prod/logs/CONTAINERID/app.log
basically IMAGES can not rely on CONTAINERS. egg/chicken problem.
but for logging, please have a look at
try to use syslog or something else established. It fits the needs of many people out there. If it also could fit your needs, you could reuse a whole bunch of software stack based on these abstractions. Like ELK or something similar.