goodls icon indicating copy to clipboard operation
goodls copied to clipboard

Terminal check breaks use in Dockerfile

Open rahulpowar opened this issue 4 years ago • 3 comments

Had trouble using this in a Dockerfile build and finally figured out that the check here: https://github.com/tanaikech/goodls/blob/3c78fe8d1e4c6a308a2a915a887d31e8c470865f/goodls.go#L340

... 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 

rahulpowar avatar Sep 27 '20 17:09 rahulpowar

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'

tanaikech avatar Sep 27 '20 22:09 tanaikech

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.

rahulpowar avatar Sep 27 '20 22:09 rahulpowar

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.

tanaikech avatar Sep 27 '20 22:09 tanaikech