In the container I used to run a .sh file that launched a program with arguments like this:
program -c /etc/configfile
blabla ENTRYPOINT ["/startup.sh"]
This resulted in output of the program going to log. Not sure what log exactly but in Portainer when clicking the container log, you could see what is going on.
Then I realized that
ENTRYPOINT ["program"] CMD ["-c", "/etc/configfile"]
is the way to go.
But this results in no more logs.
Portainer for example says “No logs available.”
What do I have to do to still get the logs? Or even better, to make it an option via ENTRYPOINT.
I found someone linking (ln) the application log to /dev/stdout and/or /dev/stderr. Is this best practice?
https://docs.docker.com/config/containers/logging/ Same here. Assuming this is the way to go unless a better answer appears below.