11# syntax=docker/dockerfile:1.9
2- # ============================================================================
3- # MiOS - Unified Image (v0.2.0)
4- # ============================================================================
5-
62ARG BASE_IMAGE=ghcr.io/ublue-os/ucore-hci:stable-nvidia
73
8- # --- ctx stage: build context ---
94FROM scratch AS ctx
105COPY automation/ /ctx/automation/
116COPY usr/ /ctx/usr/
@@ -16,10 +11,12 @@ COPY VERSION /ctx/VERSION
1611COPY config/artifacts/ /ctx/bib-configs/
1712COPY tools/ /ctx/tools/
1813
19- # --- main stage ---
20- FROM
14+ FROM ${BASE_IMAGE}
2115
2216LABEL org.opencontainers.image.title="MiOS"
17+ LABEL org.opencontainers.image.description="MiOS is a user defined, customisable Linux distro based on Fedora/uBlue/uCore"
18+ LABEL org.opencontainers.image.licenses="Apache-2.0"
19+ LABEL org.opencontainers.image.source="https://github.com/mios-dev/MiOS"
2320LABEL org.opencontainers.image.version="v0.2.0"
2421LABEL containers.bootc="1"
2522LABEL ostree.bootable="1"
@@ -30,11 +27,30 @@ ARG MIOS_USER=mios
3027ARG MIOS_HOSTNAME=mios
3128ARG MIOS_FLATPAKS=
3229
33- # Copy context
3430COPY --from=ctx /ctx /ctx
3531
36- # Unified Build Pipeline
37- RUN --mount=type=cache,dst=/var/cache/libdnf5,sharing=locked --mount=type=cache,dst=/var/cache/dnf,sharing=locked set -ex; dnf install -y --skip-unavailable --setopt=install_weak_deps=False policycoreutils-python-utils selinux-policy-targeted firewalld audit fapolicyd crowdsec usbguard kernel-devel; if [[ -n "" ]]; then echo "" | tr "," "\n " > /ctx/usr/share/mios/flatpak-list; fi; bash /ctx/automation/08-system-files-overlay.sh; chmod +x /ctx/automation/build.sh /ctx/automation/*.sh; /ctx/automation/build.sh; dnf clean all; find /var -mindepth 1 -maxdepth 1 ! -name tmp -exec rm -rf {} +; find /run -mindepth 1 -maxdepth 1 ! -name "secrets" -exec rm -rf {} + 2>/dev/null || true
32+ RUN --mount=type=cache,dst=/var/cache/libdnf5,sharing=locked \
33+ --mount=type=cache,dst=/var/cache/dnf,sharing=locked \
34+ set -ex; \
35+ dnf install -y --skip-unavailable --setopt=install_weak_deps=False \
36+ policycoreutils-python-utils \
37+ selinux-policy-targeted \
38+ firewalld \
39+ audit \
40+ fapolicyd \
41+ crowdsec \
42+ usbguard \
43+ kernel-devel; \
44+ if [[ -n "${MIOS_FLATPAKS}" ]]; then \
45+ echo "${MIOS_FLATPAKS}" | tr "," "\n " > /ctx/usr/share/mios/flatpak-list; \
46+ fi; \
47+ bash /ctx/automation/08-system-files-overlay.sh; \
48+ chmod +x /ctx/automation/build.sh /ctx/automation/*.sh 2>/dev/null || true; \
49+ chmod +x /usr/libexec/mios/copy-build-log.sh 2>/dev/null || true; \
50+ /ctx/automation/build.sh; \
51+ dnf clean all; \
52+ find /var -mindepth 1 -maxdepth 1 ! -name tmp -exec rm -rf {} +; \
53+ find /run -mindepth 1 -maxdepth 1 ! -name "secrets" -exec rm -rf {} + 2>/dev/null || true
3854
3955RUN bootc completion bash > /etc/bash_completion.d/bootc
4056RUN mkdir -p /usr/lib/extensions/source && chmod +x /ctx/tools/mios-sysext-pack.sh && /ctx/tools/mios-sysext-pack.sh /usr/lib/extensions/source || true
0 commit comments