Azure / azure-storage-azcopy

The new Azure Storage data transfer utility - AzCopy v10
MIT License
613 stars 222 forks source link

azcopy don't work in alpine since 10.25.0 #2750

Closed rnt closed 1 day ago

rnt commented 3 months ago

Since 10.25.0 the azcopy linux_amd64 binary don't works in alpine.

Which version of the AzCopy was used?

10.25.0 and 10.25.1

Which platform are you using? (ex: Windows, Mac, Linux)

Alpine Linux

What command did you run?

azcopy --version

What problem was encountered?

Any execution fail with this message:

0.104 Error relocating /usr/local/bin/azcopy: __vfprintf_chk: symbol not found
0.104 Error relocating /usr/local/bin/azcopy: __fprintf_chk: symbol not found

In 10.24.0, 10.25.0 and 10.25.1, ldd output was the same:

/ # ldd /usr/local/bin/azcopy
        /lib64/ld-linux-x86-64.so.2 (0x7efd860d0000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7efd860d0000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7efd860d0000)

How can we reproduce the problem in the simplest way?

Using the following Dockerfiles:

:green_circle: This build works fine:

 docker build . -f Dockerfile.10.24.0.txt -t local-azcopy:10.24.0
  1. Dockerfile.10.24.0.txt

    FROM docker.io/library/alpine:3.17
    
    RUN apk update
    RUN apk add --no-cache curl libc6-compat
    RUN curl -s -L https://azcopyvnext.azureedge.net/releases/release-10.24.0-20240326/azcopy_linux_amd64_10.24.0.tar.gz | tar xvzf - --strip-components=1 -C /usr/local/bin/ azcopy_linux_amd64_10.24.0/azcopy
    RUN chown root:root /usr/local/bin/azcopy
    RUN chmod +x /usr/local/bin/azcopy
    RUN ldd /usr/local/bin/azcopy
    RUN azcopy --version

:red_circle: This builds don't works:

 docker build . -f Dockerfile.10.25.0.txt -t local-azcopy:10.25.0
 docker build . -f Dockerfile.10.25.1.txt -t local-azcopy:10.25.1
  1. Dockerfile.10.25.0.txt

    FROM docker.io/library/alpine:3.17
    
    RUN apk update
    RUN apk add --no-cache curl libc6-compat
    RUN curl -s -L https://azcopyvnext.azureedge.net/releases/release-10.25.0-20240522/azcopy_linux_amd64_10.25.0.tar.gz | tar xvzf - --strip-components=1 -C /usr/local/bin/
    RUN chown root:root /usr/local/bin/azcopy
    RUN chmod +x /usr/local/bin/azcopy
    RUN ldd /usr/local/bin/azcopy
    RUN azcopy --version
  2. Dockerfile.10.25.1.txt

    FROM docker.io/library/alpine:3.17
    
    RUN apk update
    RUN apk add --no-cache curl libc6-compat
    RUN curl -s -L https://azcopyvnext.azureedge.net/releases/release-10.25.1-20240612/azcopy_linux_amd64_10.25.1.tar.gz | tar xvzf - --strip-components=1 -C /usr/local/bin/
    RUN chown root:root /usr/local/bin/azcopy
    RUN chmod +x /usr/local/bin/azcopy
    RUN ldd /usr/local/bin/azcopy
    RUN azcopy --version

Have you found a mitigation/solution?

No. :cry:

ashruti-msft commented 3 months ago

You will have to install the dependency that is missing then it should work fine.

gapra-msft commented 1 day ago

Closing this issue as a suggestion has been made and there has been no further activity on this thread. Please reopen if you are still experiencing the same issue.