-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
84 lines (71 loc) · 2.98 KB
/
Copy pathContainerfile
File metadata and controls
84 lines (71 loc) · 2.98 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
FROM scratch AS ctx
COPY build /build
COPY custom /custom
COPY system_files /system_files
ARG APPLET_ARTIFACTS_DIR=./applets-artifacts
COPY ${APPLET_ARTIFACTS_DIR} /applets-artifacts
FROM ghcr.io/ublue-os/base-main:43
ARG BUILD_IMAGE_TAG=daily
ARG BUILD_VERSION=daily
LABEL org.opencontainers.image.description="A scroller desktop image with COSMIC, Niri and Bluefin goodies together"
### MODIFICATIONS - the following RUN directive does all the things required to run scripts as recommended.
RUN rm /opt && mkdir /opt
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/tmp \
echo "Setting up applets directory..." && \
mkdir -p /applets && \
if [ -d "/ctx/applets-artifacts" ] && [ "$(ls -A /ctx/applets-artifacts 2>/dev/null)" ]; then \
echo "Found applet artifacts, copying to /applets..." && \
cp -r /ctx/applets-artifacts/* /applets/ && \
echo "Applet artifacts copied successfully:" && \
ls -la /applets/ || true; \
else \
echo "No applet artifacts found, /applets will be empty"; \
fi
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/tmp \
set -euo pipefail && \
dnf5 clean all && \
rm -rf /var/cache/dnf/* /var/log/* /tmp/* && \
echo "Running build scripts..." && \
echo "BUILD_IMAGE_TAG=${BUILD_IMAGE_TAG}" && \
echo "BUILD_VERSION=${BUILD_VERSION}" && \
/ctx/build/0-base.sh && \
BUILD_VERSION="${BUILD_VERSION}" UBLUE_IMAGE_TAG="${BUILD_IMAGE_TAG}" /ctx/build/1-id.sh
COPY --from=ghcr.io/ublue-os/brew:latest /system_files /
RUN --mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/usr/bin/systemctl preset brew-setup.service
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/tmp \
set -euo pipefail && \
/ctx/build/2-fedora.sh && \
dnf5 clean all
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/tmp \
set -euo pipefail && \
/ctx/build/3-ublue.sh && \
/ctx/build/4-niri.sh && \
/ctx/build/5-cosmic.sh
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 \
set -euo pipefail && \
cp /ctx/build/applets.yml /applets.yml && \
/ctx/build/6-extras.sh
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=tmpfs,dst=/tmp \
/ctx/build/7-systemconf.sh && \
dnf5 clean all && \
rm -rf /var/tmp/* /tmp/* /var/log/* /var/cache/dnf/* /usr/share/doc/* /usr/share/man/* /usr/share/info/* && \
echo "Build scripts completed successfully"
### LINTING - Verify final image and contents are correct.
RUN bootc container lint && \
echo "Container lint passed successfully"