Skip to content

Terminal check breaks use in Dockerfile #15

Closed

Description

@rahulpowar

Had trouble using this in a Dockerfile build and finally figured out that the check here:

if terminal.IsTerminal(int(syscall.Stdin)) {

... meant I had to echo the URL and pipe which is a bit unexpected as below.

RUN    echo 'https://drive.google.com/file/d/13oKu33Fj0cwH661apA2_vsjn9rT1NkEb/view?usp=sharing' | /tmp/goodls_linux_amd64 --np -f vocoder.pth.tar && \
    echo 'https://drive.google.com/file/d/1qN7vQRIYkzvOX_DtiZtTajzoZ1eW1-Eg/view?usp=sharing' | /tmp/goodls_linux_amd64 --np -f vocoder.json 

Activity

  1. tanaikech commented on Sep 27, 2020

    @tanaikech
    Owner

    Thank you for your comment. In that case, in my environment, the following command can also work. How about this?

    $ /tmp/goodls_linux_amd64 --np -f vocoder.pth.tar -u 'https://drive.google.com/file/d/###/view?usp=sharing' && /tmp/goodls_linux_amd64 --np -f vocoder.json -u 'https://drive.google.com/file/d/###/view?usp=sharing'
  2. rahulpowar commented on Sep 27, 2020

    @rahulpowar
    Author

    Yes that is what I was doing normally in a shell.

    However when running inside a Dockerfile build, there is no Terminal and the code path I highlighted above triggers so I need to construct the piped command. I think the std in detection could be revised.

  3. tanaikech commented on Sep 27, 2020

    @tanaikech
    Owner

    Thank you for quick reply. I could understand about the situation. In the current stage, I have no environment for testing it with "Dockerfile build". So in this case, I would like to display your comment at https://github.com/tanaikech/goodls#qa.

  4. tanaikech commented on Jun 1, 2026

    @tanaikech
    Owner

    Hi there!

    We have released version v3.4.0 of goodls which resolves the syscall.Stdin terminal-check behavior in non-interactive/headless environments.

    goodls now processes the --url (-u) flag directly and cleanly prior to checking terminal presence, which fully removes the need to echo and pipe URLs in Dockerfiles or automation pipelines!

    Please update to v3.4.0 to use this. Closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址