Eu modifiquei o seu Dockerfile para adicionar um ls -Rlh /tmp
antes do tar e vi isso:
Step 5/5 : RUN ls -Rlh /tmp/ && tar xzf /tmp/${HUGO_BINARY}.tar.gz -C /usr/local/bin/ && rm /tmp/${HUGO_BINARY}.tar.gz
---> Running in deea1f3a4b1a
/tmp/:
total 4
drwxr-xr-x 2 root root 4.0K Aug 10 05:25 hugo_0.26_linux-64bit.tar.gz
/tmp/hugo_0.26_linux-64bit.tar.gz:
total 11976
-rw-r--r-- 1 root root 10.2K Jun 17 08:06 LICENSE.md
-rw-r--r-- 1 root root 6.2K Jul 18 08:50 README.md
-rwxr-xr-x 1 root root 11.7M Aug 7 07:09 hugo
Parece que o Docker reconheceu que o arquivo é um tarball e fez a extração para você. Você provavelmente poderia fazer apenas:
# Download and Install hugo
ADD https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY}.tar.gz /usr/local/bin/
O que me dá isso:
Step 5/5 : RUN ls -Rlh /usr/local/bin/
---> Running in 6f6cabfbbde8
/usr/local/bin/:
total 47596
-rw-r--r-- 1 root root 10.2K Jun 17 08:06 LICENSE.md
-rw-r--r-- 1 root root 6.2K Jul 18 08:50 README.md
-rwxr-xr-x 1 root root 11.7M Aug 7 07:09 hugo
-rwxr-xr-x 1 root root 34.8M Jul 21 18:20 node
lrwxrwxrwx 1 root root 38 Jul 21 18:20 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root 38 Jul 21 18:20 npx -> ../lib/node_modules/npm/bin/npx-cli.js
lrwxrwxrwx 1 root root 18 Jul 21 18:21 yarn -> /opt/yarn/bin/yarn
lrwxrwxrwx 1 root root 18 Jul 21 18:21 yarnpkg -> /opt/yarn/bin/yarn
Isso parece contradizer os documentos:
- If
<src>
is a local tar archive in a recognized compression format (identity, gzip, bzip2 or xz) then it is unpacked as a directory. Resources from remote URLs are not decompressed.