Is Alpine Docker a supported platform?

I am installing PIO using PIP on Python Alpine Docker python:3.12-alpine, and I get sh: xtensa-lx106-elf-g++: not found errors during compilation (ESP-IDF for ESP32 and Arduino for ESP8266).
Per google this happens when PIO install binaries for the wrong platform, and for Alpine this could be a glibc/musl issue.

Before I spend time trying to troubleshoot, is PIO and xtensa build chains supported on Alpine?

I created reproducible steps case and logged an issue.

All toolchain binaries that I’m aware of are built against glibc, not musl. For ESP32S3 see e.g. Failing to compile using pio in termux - #3 by coloboxp

Seems that way.

fc3b9f224885:~/.platformio/packages/toolchain-xtensa/bin# ldd xtensa-lx106-elf-gcc
        /lib64/ld-linux-x86-64.so.2 (0x7fbf8a328000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fbf8a328000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by xtensa-lx106-elf-gcc)
Error relocating xtensa-lx106-elf-gcc: __strcat_chk: symbol not found
Error relocating xtensa-lx106-elf-gcc: __snprintf_chk: symbol not found
Error relocating xtensa-lx106-elf-gcc: __vfprintf_chk: symbol not found
Error relocating xtensa-lx106-elf-gcc: __read_chk: symbol not found
Error relocating xtensa-lx106-elf-gcc: __printf_chk: symbol not found
Error relocating xtensa-lx106-elf-gcc: __fprintf_chk: symbol not found
Error relocating xtensa-lx106-elf-gcc: __sprintf_chk: symbol not found
fc3b9f224885:~/.platformio/packages/toolchain-xtensa-esp32s3/bin# ldd xtensa-esp32s3-elf-g++
        /lib64/ld-linux-x86-64.so.2 (0x7f5d93469000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f5d931d0000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f5d93469000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f5d93469000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f5d931ac000)
Error relocating xtensa-esp32s3-elf-g++: __strdup: symbol not found

The toolchain packages for ESP32 are provided directly by Espressif.

https://github.com/espressif/crosstool-NG/releases

Personally, I think the chances of Espressif and all other toolchain providers recompiling all their current and older packages to work with musl is near 0%. Simplest to just use the slightly bigger Ubuntu-based docker container to do the builds.

I found some similar reports, and I also installed gcompat (with build-base that I already installed, and it seems to work.
Thank you for the hint.

The size difference is substantial, per my testing (uncompressed) ~250MB for Alpine and ~600MB for Debian Slim.

But for the sake of compatibility, maybe better to stay with a glibc variant.