gliderlabs/docker-alpine

Build mono fail in docker alpine with Segmentation fault

anson2004 opened this issue · 0 comments

Hi,

I tried to build our docker image involve mono and docker alpine. It is used to work half year ago. But yesterday when I tried to update our application code and I faced one issue.

Here is my Dockerfile


FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS dev 

WORKDIR /app
RUN dotnet --version
RUN apk add --no-cache mono --allow-untrusted --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ && \
    apk add --no-cache --virtual=.build-dependencies ca-certificates && \
    apk del .build-dependencies

Here is the error:


Building 1.0s (11/18)
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 1.04kB                                                                             0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 35B                                                                                   0.0s
 => [internal] load metadata for mcr.microsoft.com/dotnet/core/runtime:2.2-alpine                                  0.4s
 => [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:2.2-alpine                                      0.4s
 => [runtime 1/3] FROM mcr.microsoft.com/dotnet/core/runtime:2.2-alpine@sha256:ed4bacf7167c3ff6f31f4d9b84e798257a  0.0s
 => [dev  1/10] FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine@sha256:5ce9081823932f7d06ed9bf2aee6b8067e199518  0.0s
 => [internal] load build context                                                                                  0.0s
 => => transferring context: 7.63kB                                                                                0.0s
 => CACHED [runtime 2/3] WORKDIR /app                                                                              0.0s
 => CACHED [dev  2/10] WORKDIR /app                                                                                0.0s
 => CACHED [dev  3/10] RUN dotnet --version                                                                        0.0s
 => ERROR [dev  4/10] RUN apk add --no-cache mono --allow-untrusted --repository http://dl-cdn.alpinelinux.org/al  0.6s
 > [dev  4/10] RUN apk add --no-cache mono --allow-untrusted --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ &&     apk add --no-cache --virtual=.build-dependencies ca-certificates &&     apk del .build-dependencies:
10 0.404 fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
10 0.572 Segmentation fault
executor failed running [/bin/sh -c apk add --no-cache mono --allow-untrusted --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ &&     apk add --no-cache --virtual=.build-dependencies ca-certificates &&     apk del .build-dependencies]: exit code: 139

I can see fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz end up fail with Segmentation fault.

I also check the http://dl-cdn.alpinelinux.org/alpine/edge server and found this file APKINDEX.tar.gz is updated several days ago.

Is there anything I need to be aware of ?

Br, Yiqing