Official Docker build update from Ubuntu 20.04 to 22.04, but user don't know

Following is one of reason I consider we should add Ubuntu code name into crystal build name.

I come from China, i have to use mirror because is a very low internet when connect to outside, so i add some code like this into Dockerfile.

FROM crystallang/crystal:1.7.2

RUN echo 'deb https://mirrors.bfsu.edu.cn/ubuntu/ focal main restricted universe multiverse\n \
    deb https://mirrors.bfsu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse\n \
    deb https://mirrors.bfsu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse\n \
    deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse\n \
        ' > /etc/apt/sources.list

Even, not use like this, let user know new Ubuntu stable release is used is useful.

So, i consider add a alias for include Ubuntu version number e.g. crystal:1.8.0-22.04 Or like golang(It use Debian code name), 1.20.3-bullseye, 1.20-bullseye, 1-bullseye, bullseye is good.

1 Like

Added to the relevant place: Extend docker name with OS version · Issue #244 · crystal-lang/distribution-scripts · GitHub

Hi, @beta-ziliani , i meet similar issue again when i want to try build a static linux/arm64 binary for my app use docker buildx tools.

20 [build_cross_platform 6/8] RUN shards install -v
#20 0.180 Resolving dependencies
#20 0.216 Error executing crystal:
#20 0.216 Error relocating /usr/lib/libLLVM-16.so: _ZSt21__glibcxx_assert_failPKciS0_S0_: symbol not found
#20 0.216 
#20 ERROR: process "/dev/.buildkit_qemu_emulator /bin/sh -c shards install -v" did not complete successfully: exit code: 1
------
 > [build_cross_platform 6/8] RUN shards install -v:
0.180 Resolving dependencies
0.216 Error executing crystal:
0.216 Error relocating /usr/lib/libLLVM-16.so: _ZSt21__glibcxx_assert_failPKciS0_S0_: symbol not found

I only install crystal and shards use following command in alpine:3.16, then run shards install get above error.

RUN --mount=type=cache,target=/var/cache/apk \
    set -eux; \
    apk add \
    --update \
    --no-cache \
    --repository=http://mirrors.ustc.edu.cn/alpine/edge/main \
    --repository=http://mirrors.ustc.edu.cn/alpine/edge/community \
    crystal \
    shards

If this is not a official compiler issue, I guess this issue caused by use incorrect alpine version?

But, the problem is, i can’t see the Crystal official Dockerfile at Docker, i don’t know which version alpine should use, user no clue where to get the current used alpine/ubuntu version.

BTW: when switch from alpine:3.16 to alpine:3.17, it works, but who know? at least, there isn’t an easily discoverable place that tells us.

1 Like