eth-cscs / sarus

OCI-compatible engine to deploy Linux containers on HPC environments.
https://sarus.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
130 stars 10 forks source link

Preserve color output #9

Closed haampie closed 4 years ago

haampie commented 4 years ago

It would be great if sarus could preserve color output when running e.g. sarus run [image] ctest. Docker seems to do this as well.

mwe:

docker run --rm ubuntu:18.04 ls --color=auto
sarus run ubuntu:18.04 ls --color=auto

FWIW, it seems that TERM is fine inside of the container

$ sarus run ubuntu:18.04 echo $TERM
xterm-256color
haampie commented 4 years ago

Figured it out, sarus run --tty ubuntu:18.04 ls --color=auto sets terminal: true in config.json, which is enough to get color output.