-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.in
More file actions
179 lines (154 loc) · 6.02 KB
/
Containerfile.in
File metadata and controls
179 lines (154 loc) · 6.02 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
ARG BASE_IMAGE="ghcr.io/ublue-os/bluefin"
ARG TAG_VERSION="stable-daily"
#if !defined(SERVER) && !defined(BAZZITE)
FROM AKMODS AS akmods
#endif /* !defined(SERVER) && !defined(BAZZITE) */
#ifdef ZFS
FROM ZFS AS zfs
#endif /* ZFS */
#ifdef NVIDIA
FROM NVIDIA AS nvidia
#endif /* NVIDIA */
#ifdef COSMIC
FROM COMMON AS common
FROM BREW AS brew
#endif /* COSMIC */
FROM ${BASE_IMAGE}:${TAG_VERSION}
ARG IMAGE="bluefin"
ARG VERSION=""
#ifdef GHCI
ARG CI="1"
#endif /* GHCI */
# /* COPY SYSTEM FILES */
COPY system_files/shared/ /
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/remove-cliwrap.sh,dst=/ctx/remove-cliwrap.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/remove-cliwrap.sh"]
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/composefs.sh,dst=/ctx/composefs.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/composefs.sh"]
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/server-packages.sh,dst=/ctx/server-packages.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/server-packages.sh"]
#ifdef ZFS
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,from=akmods,src=/kernel-rpms,dst=/tmp/kernel-rpms \
--mount=type=bind,from=akmods,src=/rpms,dst=/tmp/rpms \
--mount=type=bind,src=build_files/kernel-swap.sh,dst=/ctx/kernel-swap.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/kernel-swap.sh"]
#ifdef NVIDIA
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,from=nvidia,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,src=build_files/install-nvidia.sh,dst=/ctx/install-nvidia.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/install-nvidia.sh"]
#endif /* NVIDIA */
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,from=zfs,src=/rpms,dst=/tmp/rpms \
--mount=type=bind,src=build_files/install-zfs.sh,dst=/ctx/install-zfs.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/install-zfs.sh"]
#endif /* ZFS */
# /* DESKTOP FILES */
#ifndef SERVER
COPY /system_files/desktop/ /
#endif /* SERVER */
#ifdef COSMIC
COPY --from=common /system_files/shared /
COPY --from=common /system_files/bluefin /
COPY --from=brew /system_files /
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/cosmic.sh,dst=/ctx/cosmic.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/cosmic.sh"]
#endif /* COSMIC */
#ifndef SERVER
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/desktop-packages.sh,dst=/ctx/desktop-packages.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/desktop-packages.sh"]
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/desktop-defaults.sh,dst=/ctx/desktop-defaults.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/desktop-defaults.sh"]
#endif /* SERVER */
#if !defined(BAZZITE) && !defined(SERVER)
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/steam.sh,dst=/ctx/steam.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/steam.sh"]
#endif /* !defined(BAZZITE) && !defined(SERVER) */
# /* OVERRIDE FILES */
COPY system_files/override/ /
# /* BRANDING */
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/branding.sh,dst=/ctx/branding.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/branding.sh"]
# /* SIGNING */
COPY cosign.pub /etc/pki/containers/m2os.pub
COPY cosign-backup.pub /etc/pki/containers/m2os-backup.pub
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/signing.sh,dst=/ctx/signing.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/signing.sh"]
# /* GENERATE INITRAMFS */
RUN --mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/initramfs.sh,dst=/ctx/initramfs.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/initramfs.sh"]
# /* GROUP FILES FOR CHUNKAH */
RUN --mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
--mount=type=tmpfs,dst=/run \
--mount=type=bind,src=build_files/group-files.sh,dst=/ctx/group-files.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/group-files.sh"]
# /* CLEANUP */
RUN --mount=type=bind,src=build_files/cleanup.sh,dst=/ctx/cleanup.sh \
--mount=type=bind,src=build_files/common.sh,dst=/ctx/common.sh \
["/ctx/cleanup.sh"]
RUN ["bootc", "container", "lint"]