Last active
April 1, 2021 14:14
-
-
Save klutchell/1eff23177ed112e02a0f825adc9f9555 to your computer and use it in GitHub Desktop.
python3-slim (buildroot)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# caching | |
BR2_DL_DIR="/cache/dl" | |
BR2_CCACHE=y | |
BR2_CCACHE_DIR="/cache/ccache" | |
BR2_CCACHE_USE_BASEDIR=y | |
# arch | |
BR2_arm=y | |
# toolchains | |
BR2_TOOLCHAIN_BUILDROOT_MUSL=y | |
BR2_TOOLCHAIN_BUILDROOT_CXX=y | |
BR2_KERNEL_HEADERS_4_19=y | |
BR2_GCC_ENABLE_LTO=y | |
# init | |
BR2_INIT_NONE=y | |
# system utils | |
BR2_PACKAGE_BUSYBOX=y | |
BR2_SYSTEM_BIN_SH_NONE=n | |
BR2_PACKAGE_IFUPDOWN_SCRIPTS=n | |
BR2_PACKAGE_PYTHON3=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#syntax=docker/dockerfile:1.2 | |
FROM klutchell/buildroot-base:2020.11 as build | |
# copy common config | |
COPY common.cfg ./.config | |
# hadolint ignore=SC2215 | |
RUN --mount=type=cache,target=/cache,uid=1000,gid=1000,sharing=private \ | |
make olddefconfig && make source && make | |
# hadolint ignore=DL3002 | |
USER root | |
WORKDIR /rootfs | |
# extract the rootfs so we can just COPY in future layers | |
RUN tar xpf /home/br-user/output/images/rootfs.tar -C /rootfs | |
FROM scratch | |
COPY --from=build rootfs/ / | |
CMD [ "/bin/busybox", "sh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment