File tree Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Original file line number Diff line number Diff line change 1- FROM debian:10 -slim
2- ARG VERSION=6.2.0
1+ FROM debian:12 -slim as build
2+ ARG VERSION=9.0.5
33
4- RUN apt update
5- RUN DEBIAN_FRONTEND=noninteractive apt install -y build-essential pkg-config libffi-dev wget git gettext python3
6- RUN git clone https://github.com/adafruit/circuitpython.git
4+ # Install system requirements
5+ RUN apt update \
6+ && apt install -y build-essential cmake git git-lfs gettext libffi-dev pkg-config python3 python3-pip python3-venv uncrustify
7+ # Clone the CircuitPython project
8+ RUN git clone -b $VERSION https://github.com/adafruit/circuitpython.git
9+ # Setup build dependencies
710WORKDIR /circuitpython
8- RUN git checkout $VERSION
9- RUN git submodule sync --quiet --recursive
10- RUN git submodule update --init
11- RUN make -C mpy-cross
12- RUN cd ports/unix && make axtls && make micropython && make install
13- RUN apt-get purge --auto-remove -y build-essential pkg-config libffi-dev wget git gettext python3
14- RUN rm -rf /circuitpython
15- WORKDIR /
11+ RUN python3 -m venv .venv
12+ ENV PATH="/circuitpython/.venv/bin:$PATH"
13+ RUN python3 -m pip install --upgrade -r requirements-dev.txt \
14+ && python tools/ci_fetch_deps.py tests
15+ # Build the binaires
16+ RUN make -C mpy-cross \
17+ && make -C ports/unix
18+
19+ # Create final runtime container
20+ FROM debian:12-slim
21+ COPY --from=build /circuitpython/mpy-cross/build/mpy-cross /usr/local/bin/mpy-cross
22+ COPY --from=build /circuitpython/ports/unix/build-standard/micropython /usr/local/bin/micropython
1623CMD ["/usr/local/bin/micropython" ]
You can’t perform that action at this time.
0 commit comments