This repository was archived by the owner on Mar 21, 2026. It is now read-only.
forked from ublue-os/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
161 lines (132 loc) · 5.04 KB
/
Containerfile
File metadata and controls
161 lines (132 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
ARG BASE_IMAGE_ORG="${BASE_IMAGE_ORG}:-quay.io/fedora-ostree-desktops"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}:-kinoite"
ARG BASE_IMAGE="${BASE_IMAGE_ORG}/${BASE_IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}:-43"
ARG COMMON_IMAGE="${COMMON_IMAGE}:-ghcr.io/get-aurora-dev/common:latest"
ARG COMMON_IMAGE_SHA=""
ARG BREW_IMAGE="${BREW_IMAGE}:-ghcr.io/ublue-os/brew:latest"
ARG BREW_IMAGE_SHA=""
FROM ${COMMON_IMAGE}@${COMMON_IMAGE_SHA} AS common
FROM ${BREW_IMAGE}@${BREW_IMAGE_SHA} AS brew
FROM scratch AS ctx
COPY /build_files /build_files
# https://github.com/get-aurora-dev/common
COPY --from=common /logos /system_files/shared
COPY --from=common /system_files /system_files
COPY --from=common /wallpapers /system_files/shared
# https://github.com/ublue-os/brew
COPY --from=brew /system_files /system_files/shared
# Overwrite files from common if necessary
COPY /system_files /system_files
## aurora image section
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS base
ARG AKMODS_FLAVOR="coreos-stable"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION=""
ARG IMAGE_NAME="aurora"
ARG IMAGE_VENDOR="ublue-os"
ARG KERNEL=""
ARG SHA_HEAD_SHORT="dedbeef"
ARG UBLUE_IMAGE_TAG="stable"
ARG VERSION=""
ARG IMAGE_FLAVOR=""
# Prep
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/build_files/shared/build.sh
# so ghcurl wrapper is available to all later RUNs
ENV PATH="/tmp/scripts/helpers:${PATH}"
# Generate image-info.json, os-release
RUN --network=none \
--mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/base/00-image-info.sh
# Install Additional Packages
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/build_files/base/03-packages.sh
# Install Kernel and Akmods
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=secret,id=GITHUB_TOKEN \
/ctx/build_files/base/04-install-kernel-akmods.sh
# Wallpapers/Apperance
RUN --network=none \
--mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/base/05-branding.sh
# Install Overrides and Fetch Install
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=secret,id=GITHUB_TOKEN \
/ctx/build_files/base/06-override-install.sh
# Get Firmare for Framework
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/build_files/base/08-firmware.sh
# Beta
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
if [ "${UBLUE_IMAGE_TAG}" == "beta" ] ; then \
/ctx/build_files/base/10-beta.sh; \
fi
# Enable systemd services and Remove Items
RUN --network=none \
--mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/build_files/base/17-cleanup.sh
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/build_files/base/18-workarounds.sh
# Regenerate initramfs
RUN --network=none \
--mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/base/19-initramfs.sh
# Aurora-DX
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=secret,id=GITHUB_TOKEN \
if [ "${IMAGE_FLAVOR}" == "dx" ] ; then \
/ctx/build_files/shared/build-dx.sh; \
fi
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=secret,id=GITHUB_TOKEN \
if [ "${IMAGE_FLAVOR}" == "dx" ] ; then \
/ctx/build_files/dx/00-dx.sh; \
fi
RUN --network=none \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/shared/validate-repos.sh
RUN --network=none \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/shared/clean-stage.sh
# Set filesystem properties for rechunker
RUN --network=none \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/base/20-layer-definitions.sh
# Sanity checks
RUN --network=none \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_files/base/21-tests.sh
RUN --network=none \
--mount=type=bind,from=ctx,source=/,target=/ctx \
if [ "${IMAGE_FLAVOR}" == "dx" ] ; then \
/ctx/build_files/dx/10-tests-dx.sh; \
fi
# Needs to be here to make the main image build strict (no /opt there)
# This is for downstream images/stuff like k0s
RUN rm -rf /opt && ln -s /var/opt /opt
CMD ["/sbin/init"]
RUN bootc container lint