When trying to integrate this docker image for use in Gitlab CI, I noticed that biome takes about 10x longer to execute when using this image compared to running biome natively. This is reproducable outside of Gitlab CI and the reason seems to be that the image is based on alpine. My assumption is that it has something to do with alpine using musl instead of glibc.
When I swap out the base image to debian:slim , the performance is very close to native. For additional context, all the systems I'm working with are using x64, so I haven't had the chance to try it out on other architectures.
FROM debian:trixie-slim AS fetcher
ARG ARCH="x64"
ARG BIOME_VERSION=1.9.4
ENV BIOME_VERSION=${BIOME_VERSION}
# biome v1
ADD https://github.com/biomejs/biome/releases/download/cli/v${BIOME_VERSION}/biome-linux-${ARCH} /usr/local/bin/biome
# biome v2
# ADD https://github.com/biomejs/biome/releases/download/@biomejs/biome@${BIOME_VERSION}/biome-linux-${ARCH} /usr/local/bin/biome
RUN chmod +x /usr/local/bin/biome
FROM debian:trixie-slim AS biome
WORKDIR /code
RUN apt update && apt install -y git && rm -rf /var/lib/apt/lists/* && git config --global --add safe.directory /code
COPY --from=fetcher /usr/local/bin/biome /usr/local/bin/biome
ENTRYPOINT [ "/usr/local/bin/biome" ]
When trying to integrate this docker image for use in Gitlab CI, I noticed that biome takes about 10x longer to execute when using this image compared to running biome natively. This is reproducable outside of Gitlab CI and the reason seems to be that the image is based on alpine. My assumption is that it has something to do with alpine using musl instead of glibc.
When I swap out the base image to
debian:slim, the performance is very close to native. For additional context, all the systems I'm working with are using x64, so I haven't had the chance to try it out on other architectures.