forked from ublue-os/image-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
108 lines (94 loc) · 3.29 KB
/
Containerfile
File metadata and controls
108 lines (94 loc) · 3.29 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
ARG REPO_SOURCE="ghcr.io"
ARG REPO_OWNER="ublue-os"
ARG BASE_IMAGE="ucore-minimal"
ARG TAG_VERSION="stable-zfs"
# Allow build scripts to be referenced without being copied into the final image
FROM scratch AS ctx
COPY build_files /
COPY cosign.pub /signing
#0 Base Image
FROM ${REPO_SOURCE}/${REPO_OWNER}/${BASE_IMAGE}:${TAG_VERSION}
#1 Remove unneeded packages
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/remove-packages.sh && \
ostree container commit
#2 Configure tweaks
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/tweaks.sh && \
ostree container commit
#3 Install and enable greenboot
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/greenboot.sh && \
ostree container commit
#4 Install man
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/man.sh && \
ostree container commit
#5 Install Cockpit
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/cockpit.sh && \
ostree container commit
#6 Install Samba
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/samba.sh && \
ostree container commit
#7 Install Terminal Programs
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/terminal.sh && \
ostree container commit
#8 Install Packages in the RPMFusion repos
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/fusion-packages.sh && \
ostree container commit
#9 Install media-based packages
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/media.sh && \
ostree container commit
#10 Install github-based packages
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /ctx/github.sh && \
ostree container commit
#11 Install nix
#RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
# --mount=type=cache,dst=/var/cache \
# --mount=type=cache,dst=/var/log \
# --mount=type=tmpfs,dst=/tmp \
# bash /ctx/nix.sh && \
# ostree container commit
#11 Install and run booster
# RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
# --mount=type=cache,dst=/var/cache \
# --mount=type=cache,dst=/var/log \
# --mount=type=tmpfs,dst=/tmp \
# bash /ctx/booster.sh && \
# ostree container commit