docker使用yarn3构建tabix镜像

tabix是clickhouse的WebUI。

// https://github.com/tabixio/tabix/issues/261

FROM ubuntu:22.04

RUN \
    apt-get update && \
    apt-get install -y \
        curl \
        unzip

RUN \
    curl -fsSL https://deb.nodesource.com/setup_lts.x | sh - && \
    apt-get install -y nodejs && \
    npm i -g yarn

WORKDIR /tmp

ADD \
    https://github.com/tabixio/tabix/archive/refs/heads/master.zip .

RUN \
    unzip master.zip && rm master.zip && \
    cd tabix-master && \
    echo 'nodeLinker: node-modules' > .yarnrc.yml && \
    yarn set version 3.1.1 && \
    yarn install && \
    yarn build

WORKDIR /tmp/tabix-master/dist

CMD [ "python3", "-m", "http.server" ]