File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1- FROM debian:12-slim as build
1+ FROM debian:12-slim AS build
22ARG VERSION=9.2.1
33ARG VARIANT=container
4- ARG MICROPYPATH=/ciruitpy/lib
54
65# Install system requirements
76RUN apt update \
@@ -20,16 +19,18 @@ COPY variants/ /circuitpython/ports/unix/variants/
2019RUN make -C mpy-cross \
2120 && VARIANT=$VARIANT BUILD=build make -C ports/unix
2221
23- # Create final runtime container
24- FROM debian:12-slim
22+ # Create a base image primarily for CI/CD pipelines runners
23+ FROM debian:12-slim AS base
2524COPY --from=build /circuitpython/mpy-cross/build/mpy-cross /usr/local/bin/mpy-cross
2625COPY --from=build /circuitpython/ports/unix/build/micropython /usr/local/bin/micropython
27- # Setup non-root runtime user
26+ ENTRYPOINT ["/usr/local/bin/micropython" ]
27+
28+ # Set up non-root runtime user for everyone else
29+ FROM base AS runtime
2830RUN useradd -Md /circuitpy circuitpy \
2931 && mkdir /circuitpy \
3032 && chown circuitpy:circuitpy /circuitpy
3133USER circuitpy
3234WORKDIR /circuitpy
3335# Load libraries from the working directory
34- ENV MICROPYPATH=$MICROPYPATH
35- ENTRYPOINT ["/usr/local/bin/micropython" ]
36+ ENV MICROPYPATH=/ciruitpy/lib
You can’t perform that action at this time.
0 commit comments