Horje
docker compose logs container stdout Code Example
docker compose logs container stdout
init-app.sh:

#!/usr/bin/env sh

# Exit script immediately if a command exits with a non-zero status.
set -e

# Install and configure app
[...]

# Start app
exec ./app
The above configuration works, but outputs only to stdout.

Modification #1 (last line of init script):

# Start app and log output to file
exec ./app >> "/app/log.txt" 2>&1
This configuration works also, logging the output to a file, but not to stdout.

Modification #2 (last line of init script):

# Start app and log output to both a file and stdout
exec ./app 2>&1 | tee -a "/app/log.txt"




Shell

Related
Pulling a branch Code Example Pulling a branch Code Example
aws ecr list repositories from shared endpoint repo Code Example aws ecr list repositories from shared endpoint repo Code Example
linux find jpg sorted by date Code Example linux find jpg sorted by date Code Example
wevtutil query event id Code Example wevtutil query event id Code Example
jbl bt wireless headphones not working in fedora linux Code Example jbl bt wireless headphones not working in fedora linux Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9