Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Might it be possible to automatically set -t ? #72

Open
nsheff opened this issue Jan 14, 2021 · 0 comments
Open

Might it be possible to automatically set -t ? #72

nsheff opened this issue Jan 14, 2021 · 0 comments

Comments

@nsheff
Copy link
Member

nsheff commented Jan 14, 2021

I found this approach interesting:

https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-yq.sh


# Only allocate tty if we detect one
if [ -t 0 ] && [ -t 1 ]; then
    DOCKER_RUN_OPTIONS="${DOCKER_RUN_OPTIONS} -t"
fi

# Always set -i to support piped and terminal input in run/exec
DOCKER_RUN_OPTIONS="${DOCKER_RUN_OPTIONS} -i"

# shellcheck disable=SC2086
exec docker run --rm ${DOCKER_RUN_OPTIONS} ${YQ_OPTIONS} ${VOLUMES} -w "${PWD}" --entrypoint yq "${YQ_IMAGE_TAG:-ghcr.io/linuxserver/yq:latest}" "$@"

@nsheff nsheff mentioned this issue Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant