Tar fails in build but passes in docker

Untaring a file fails in the build with:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Script that is being run: geckodriver.sh

Running it in a docker with Xenial Ubuntu passes.

FROM ubuntu:xenial
COPY installation/ /installation
RUN apt-get update && \
    apt-get -qq -y install libglib2.0-0 libnss3 libx11-6 unzip curl jq && \
    installation/geckodriver.sh latest && \
    installation/chromedriver.sh latest
CMD ["bash"]

Not sure why this is happening or how to troubleshoot it.


Seems I have was hitting a GitHub API rate limit issue. So there was no actual data in the tar.gz.

New problem however: mv: cannot move '/home/travis/geckodriver' to '/usr/local/bin/geckodriver': Permission denied

Why can’t I write to /usr/local/bin? How can I accomplish that?

Use sudo.

1 Like