Skip to content

Instantly share code, notes, and snippets.

@planetis-m
Last active August 25, 2025 20:47
Show Gist options
  • Save planetis-m/66da9a06b68ee5fd3e2a606c3a735e3e to your computer and use it in GitHub Desktop.
Save planetis-m/66da9a06b68ee5fd3e2a606c3a735e3e to your computer and use it in GitHub Desktop.
FROM registry.fedoraproject.org/fedora-toolbox:42
ARG ESP_IDF_VERSION=v5.5
ENV IDF_GITHUB_ASSETS=dl.espressif.com/github_assets \
IDF_TOOLS_PATH=/opt/.espressif \
PATH=/usr/local/bin:$PATH
# Base tools and compilers
RUN dnf -y upgrade --refresh && \
dnf -y --setopt=install_weak_deps=False install \
git-credential-libsecret nano gdb gcc clang llvm git curl wget ca-certificates \
alsa-lib-devel mesa-libGL-devel libxkbcommon-devel wayland-devel libatomic \
flex bison gperf python3 python3-pip cmake ninja-build ccache \
dfu-util unzip xz tar nodejs nodejs-full-i18n npm uv libasan libubsan libtsan valgrind valgrind-devel libusb1 && \
dnf -y copr enable planetis/nim && \
dnf -y install nim-devel && \
dnf clean all
# Nim c2nim -> /usr/local/bin
RUN mkdir -p /tmp/build && cd /tmp/build && \
git clone --depth 1 https://github.com/nim-lang/c2nim && \
cd c2nim && nim c -d:release c2nim.nim && \
install -m 0755 c2nim /usr/local/bin/ && \
cd / && rm -rf /tmp/build
# ESP-IDF v5.5 from ZIP, official structure under /opt
RUN mkdir -p /opt/esp/esp-idf "${IDF_TOOLS_PATH}" /tmp/download && \
cd /tmp/download && \
curl --http1.1 -fL -o "esp-idf.zip" \
"https://github.com/espressif/esp-idf/releases/download/${ESP_IDF_VERSION}/esp-idf-${ESP_IDF_VERSION}.zip" && \
unzip -q "esp-idf.zip" -d /opt/esp && \
cd "/opt/esp/esp-idf-${ESP_IDF_VERSION}" && \
./install.sh esp32s3 && \
chmod -R a+rX /opt/esp && \
chmod -R a+rwX "${IDF_TOOLS_PATH}" && \
cd / && rm -rf /tmp/download
# Qwen CLI (global)
RUN npm install -g @qwen-code/qwen-code@latest && \
npm cache clean --force || true
# Make tools easy to use in interactive shells
RUN printf '%s\n' \
'get_idf() {' \
" . /opt/esp/esp-idf-${ESP_IDF_VERSION}/export.sh" \
'}' \
> /etc/profile.d/esp-idf.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment