1

Today, I was trying to build a Docker container using Alpine Linux 3.2. However, the apk command was not successful during building the container image because it could not retrieve the APKINDEX file.

I tried to add other dl- links to the Dockerfile recipe with no success:

RUN echo "ipv6" >> /etc/modules
RUN echo "http://dl-1.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories; \
    echo "http://dl-2.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories; \
    echo "http://dl-3.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories; \
    echo "http://dl-4.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories; \
    echo "http://dl-5.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories; \
    echo "http://dl-6.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories

It seems that the domain associated with alpinelinux.org has been expired yesterday, and therefore the servers were not accessible via their names.

Is there any way to retrieve the actual IP addresses of the dl- servers to be added to the Dockerfile?

Thanks.

β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
imriss
  • 1,815
  • 4
  • 31
  • 46

1 Answers1

3

The solution I found was:

  1. Use the Domain History Checker from WhoIsRequest to determine the latest working name server associated to one of dl- servers, for example dl-6.alpinelinux.org:

    http://whoisrequest.com/history/

    The result was ns2.alpinelinux.org.

  2. Then, use a regular nslookup service, such as http://www.kloth.net/services/nslookup.php, along with ns2.alpinelinux.org and dl-6.alpinelinux.org, to get the actual IP of the repository. Finally, I arrived to:

    Name: dl-6.alpinelinux.org, Address: 107.181.185.116

  3. Now, the repository line in the Dockerflile looks like:

    RUN echo "http://107.181.185.116/alpine/v3.2/main" >> /etc/apk/repositories; \

That is all.

Eric D. Johnson
  • 10,219
  • 9
  • 39
  • 46
imriss
  • 1,815
  • 4
  • 31
  • 46