Basic alpine chroot

This commit is contained in:
2026-03-22 00:59:37 +08:00
parent 66e985f09a
commit 64970aa459
5 changed files with 62 additions and 0 deletions

22
docker/alpine.Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
ARG TAG=dev
ARG DOCKER_IMAGE_ROOT=monok8s
FROM --platform=linux/amd64 ${DOCKER_IMAGE_ROOT}/build-base:${TAG} AS build-base
ARG ALPINE_ARCH
ARG ALPINE_VER
RUN apt-get update && apt-get install -y qemu-user-static --no-install-recommends
RUN mkdir -p "/out/rootfs"
# RUN curl -L \
# "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VER}-${ALPINE_ARCH}.tar.gz" \
# -o alpine-minirootfs.tar.gz
# RUN tar -xzf alpine-minirootfs.tar.gz -C "/out/rootfs"
# Dev-only shortcut
COPY dev/alpine.tar.gz ./
RUN tar -xf alpine.tar.gz -C "/out/rootfs"
COPY alpine/*.sh /